diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-01-25 11:39:07 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-01-25 15:20:42 +0000 |
commit | 6c91641271e536ffaa88a1dff5127e42ee99a91e (patch) | |
tree | 703d9dd49602377ddc90cbf886aad37913f2496b /chromium/base/tuple.h | |
parent | b145b7fafd36f0c260d6a768c81fc14e32578099 (diff) | |
download | qtwebengine-chromium-6c91641271e536ffaa88a1dff5127e42ee99a91e.tar.gz |
BASELINE: Update Chromium to 49.0.2623.23
Also adds missing printing sources.
Change-Id: I3726b8f0c7d6751c9fc846096c571fadca7108cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'chromium/base/tuple.h')
-rw-r--r-- | chromium/base/tuple.h | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/chromium/base/tuple.h b/chromium/base/tuple.h index ef51d85fed9..e5872cc4fa8 100644 --- a/chromium/base/tuple.h +++ b/chromium/base/tuple.h @@ -28,7 +28,10 @@ #ifndef BASE_TUPLE_H_ #define BASE_TUPLE_H_ +#include <stddef.h> + #include "base/bind_helpers.h" +#include "build/build_config.h" namespace base { @@ -150,7 +153,7 @@ template <size_t N, typename T> struct TupleLeaf; template <typename... Ts> -struct Tuple : TupleBase<Ts...> { +struct Tuple final : TupleBase<Ts...> { Tuple() : TupleBase<Ts...>() {} explicit Tuple(typename TupleTraits<Ts>::ParamType... args) : TupleBase<Ts...>(args...) {} @@ -158,7 +161,7 @@ struct Tuple : TupleBase<Ts...> { // Avoids ambiguity between Tuple's two constructors. template <> -struct Tuple<> {}; +struct Tuple<> final {}; template <size_t... Ns, typename... Ts> struct TupleBaseImpl<IndexSequence<Ns...>, Ts...> : TupleLeaf<Ns, Ts>... { @@ -241,11 +244,6 @@ inline Tuple<Ts&...> MakeRefTuple(Ts&... arg) { // Non-Static Dispatchers with no out params. -template <typename ObjT, typename Method, typename A> -inline void DispatchToMethod(ObjT* obj, Method method, const A& arg) { - (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg)); -} - template <typename ObjT, typename Method, typename... Ts, size_t... Ns> inline void DispatchToMethodImpl(ObjT* obj, Method method, @@ -263,11 +261,6 @@ inline void DispatchToMethod(ObjT* obj, // Static Dispatchers with no out params. -template <typename Function, typename A> -inline void DispatchToMethod(Function function, const A& arg) { - (*function)(base::internal::UnwrapTraits<A>::Unwrap(arg)); -} - template <typename Function, typename... Ts, size_t... Ns> inline void DispatchToFunctionImpl(Function function, const Tuple<Ts...>& arg, @@ -284,29 +277,6 @@ inline void DispatchToFunction(Function function, const Tuple<Ts...>& arg) { template <typename ObjT, typename Method, - typename In, - typename... OutTs, - size_t... OutNs> -inline void DispatchToMethodImpl(ObjT* obj, - Method method, - const In& in, - Tuple<OutTs...>* out, - IndexSequence<OutNs...>) { - (obj->*method)(base::internal::UnwrapTraits<In>::Unwrap(in), - &get<OutNs>(*out)...); -} - -template <typename ObjT, typename Method, typename In, typename... OutTs> -inline void DispatchToMethod(ObjT* obj, - Method method, - const In& in, - Tuple<OutTs...>* out) { - DispatchToMethodImpl(obj, method, in, out, - MakeIndexSequence<sizeof...(OutTs)>()); -} - -template <typename ObjT, - typename Method, typename... InTs, typename... OutTs, size_t... InNs, |