summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authormdempsky <mdempsky@chromium.org>2016-03-07 14:18:35 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-07 22:20:04 +0000
commit390ab1e0cbc72313e9a4070424daa84e69d8b710 (patch)
tree088b0966cd171ce631325cacdf0956aacba560c9 /base
parent6ba232e755b819906dca628cff002849866b0e9c (diff)
downloadchromium_src-390ab1e0cbc72313e9a4070424daa84e69d8b710.zip
chromium_src-390ab1e0cbc72313e9a4070424daa84e69d8b710.tar.gz
chromium_src-390ab1e0cbc72313e9a4070424daa84e69d8b710.tar.bz2
base: eliminate TupleTraits and TupleTypes
The only remaining use of these were base::TupleTypes<T>::ValueTuple, which just maps Tuple<Ts...> to Tuple<remove_reference_t<Ts>...>. However, all of the uses were for reference-free tuples, making it a noop. BUG=554987 Review URL: https://codereview.chromium.org/1768153002 Cr-Commit-Position: refs/heads/master@{#379667}
Diffstat (limited to 'base')
-rw-r--r--base/tuple.h37
1 files changed, 0 insertions, 37 deletions
diff --git a/base/tuple.h b/base/tuple.h
index 8898fe0..78dfd75 100644
--- a/base/tuple.h
+++ b/base/tuple.h
@@ -110,28 +110,6 @@ struct MakeIndexSequenceImpl<N, Ns...>
template <size_t N>
using MakeIndexSequence = typename MakeIndexSequenceImpl<N>::Type;
-// Traits ----------------------------------------------------------------------
-//
-// A simple traits class for tuple arguments.
-//
-// ValueType: the bare, nonref version of a type (same as the type for nonrefs).
-// RefType: the ref version of a type (same as the type for refs).
-// ParamType: what type to pass to functions (refs should not be constified).
-
-template <class P>
-struct TupleTraits {
- typedef P ValueType;
- typedef P& RefType;
- typedef const P& ParamType;
-};
-
-template <class P>
-struct TupleTraits<P&> {
- typedef P ValueType;
- typedef P& RefType;
- typedef P& ParamType;
-};
-
// Tuple -----------------------------------------------------------------------
//
// This set of classes is useful for bundling 0 or more heterogeneous data types
@@ -151,21 +129,6 @@ using Tuple = std::tuple<Ts...>;
using std::get;
-// Tuple types ----------------------------------------------------------------
-//
-// Allows for selection of ValueTuple/RefTuple/ParamTuple without needing the
-// definitions of class types the tuple takes as parameters.
-
-template <typename T>
-struct TupleTypes;
-
-template <typename... Ts>
-struct TupleTypes<Tuple<Ts...>> {
- using ValueTuple = Tuple<typename TupleTraits<Ts>::ValueType...>;
- using RefTuple = Tuple<typename TupleTraits<Ts>::RefType...>;
- using ParamTuple = Tuple<typename TupleTraits<Ts>::ParamType...>;
-};
-
// Tuple creators -------------------------------------------------------------
//
// Helper functions for constructing tuples while inferring the template