Pull the new r369476 of base library from Chromium
The merge was done against r369476 which corresponds to git commit
0471d0e2e2ef4a544a63481a389e1df33ea7c00a of Jan 14, 2016
Change-Id: Ie6894cf65424cc5ad115110faccd51602b2d1234
Reviewed-on: https://weave-review.googlesource.com/2225
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
diff --git a/third_party/chromium/base/tuple.h b/third_party/chromium/base/tuple.h
index ef51d85..e5872cc 100644
--- a/third_party/chromium/base/tuple.h
+++ b/third_party/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 @@
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 @@
// 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 @@
// 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 @@
// 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 @@
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,