diff options
author | Abseil Team <absl-team@google.com> | 2018-10-09 18:50:26 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-10-09 20:25:58 (GMT) |
commit | 7d3b73c85a42811309eac26e5cbe054c40b64785 (patch) | |
tree | 589142a210a7bf1ccfd51180586a35c4a6f73b68 /googlemock/include/gmock/gmock-generated-matchers.h.pump | |
parent | 5434989dbd8a15f14f33cbeb9d94801247031c95 (diff) | |
download | googletest-7d3b73c85a42811309eac26e5cbe054c40b64785.zip googletest-7d3b73c85a42811309eac26e5cbe054c40b64785.tar.gz googletest-7d3b73c85a42811309eac26e5cbe054c40b64785.tar.bz2 |
Unconditionally use std::tuple.
Remove all mention of TR1 tuple and our own implementation of tuple.
PiperOrigin-RevId: 216395043
Diffstat (limited to 'googlemock/include/gmock/gmock-generated-matchers.h.pump')
-rw-r--r-- | googlemock/include/gmock/gmock-generated-matchers.h.pump | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/googlemock/include/gmock/gmock-generated-matchers.h.pump b/googlemock/include/gmock/gmock-generated-matchers.h.pump index ad02ea7..311e127 100644 --- a/googlemock/include/gmock/gmock-generated-matchers.h.pump +++ b/googlemock/include/gmock/gmock-generated-matchers.h.pump @@ -55,7 +55,7 @@ $range i 0..n-1 // The type of the i-th (0-based) field of Tuple. #define GMOCK_FIELD_TYPE_(Tuple, i) \ - typename ::testing::tuple_element<i, Tuple>::type + typename ::std::tuple_element<i, Tuple>::type // TupleFields<Tuple, k0, ..., kn> is for selecting fields from a // tuple of type Tuple. It has two members: @@ -63,10 +63,11 @@ $range i 0..n-1 // type: a tuple type whose i-th field is the ki-th field of Tuple. // GetSelectedFields(t): returns fields k0, ..., and kn of t as a tuple. // -// For example, in class TupleFields<tuple<bool, char, int>, 2, 0>, we have: +// For example, in class TupleFields<std::tuple<bool, char, int>, 2, 0>, +// we have: // -// type is tuple<int, bool>, and -// GetSelectedFields(make_tuple(true, 'a', 42)) is (42, true). +// type is std::tuple<int, bool>, and +// GetSelectedFields(std::make_tuple(true, 'a', 42)) is (42, true). template <class Tuple$for i [[, int k$i = -1]]> class TupleFields; @@ -75,9 +76,9 @@ class TupleFields; template <class Tuple$for i [[, int k$i]]> class TupleFields { public: - typedef ::testing::tuple<$for i, [[GMOCK_FIELD_TYPE_(Tuple, k$i)]]> type; + typedef ::std::tuple<$for i, [[GMOCK_FIELD_TYPE_(Tuple, k$i)]]> type; static type GetSelectedFields(const Tuple& t) { - return type($for i, [[get<k$i>(t)]]); + return type($for i, [[std::get<k$i>(t)]]); } }; @@ -91,9 +92,9 @@ $range k 0..n-1 template <class Tuple$for j [[, int k$j]]> class TupleFields<Tuple, $for k, [[$if k < i [[k$k]] $else [[-1]]]]> { public: - typedef ::testing::tuple<$for j, [[GMOCK_FIELD_TYPE_(Tuple, k$j)]]> type; + typedef ::std::tuple<$for j, [[GMOCK_FIELD_TYPE_(Tuple, k$j)]]> type; static type GetSelectedFields(const Tuple& $if i==0 [[/* t */]] $else [[t]]) { - return type($for j, [[get<k$j>(t)]]); + return type($for j, [[std::get<k$j>(t)]]); } }; @@ -534,7 +535,7 @@ $var param_field_decls2 = [[$for j return ::testing::internal::FormatMatcherDescription(\ negation, #name, \ ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::testing::tuple<$for j, [[p$j##_type]]>($for j, [[p$j]])));\ + ::std::tuple<$for j, [[p$j##_type]]>($for j, [[p$j]])));\ }\ };\ template <typename arg_type>\ |