Unconditionally use std::tuple.
Remove all mention of TR1 tuple and our own implementation of tuple. PiperOrigin-RevId: 216395043
This commit is contained in:
committed by
Gennadiy Civil
parent
0a82a5a5ab
commit
dd4e36663c
@@ -439,7 +439,7 @@ class Action {
|
||||
// template <typename Result, typename ArgumentTuple>
|
||||
// Result Perform(const ArgumentTuple& args) const {
|
||||
// // Processes the arguments and returns a result, using
|
||||
// // tr1::get<N>(args) to get the N-th (0-based) argument in the tuple.
|
||||
// // std::get<N>(args) to get the N-th (0-based) argument in the tuple.
|
||||
// }
|
||||
// ...
|
||||
// };
|
||||
@@ -838,7 +838,7 @@ class SetArgumentPointeeAction {
|
||||
template <typename Result, typename ArgumentTuple>
|
||||
void Perform(const ArgumentTuple& args) const {
|
||||
CompileAssertTypesEqual<void, Result>();
|
||||
*::testing::get<N>(args) = value_;
|
||||
*::std::get<N>(args) = value_;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -861,7 +861,7 @@ class SetArgumentPointeeAction<N, Proto, true> {
|
||||
template <typename Result, typename ArgumentTuple>
|
||||
void Perform(const ArgumentTuple& args) const {
|
||||
CompileAssertTypesEqual<void, Result>();
|
||||
::testing::get<N>(args)->CopyFrom(*proto_);
|
||||
::std::get<N>(args)->CopyFrom(*proto_);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -54,164 +54,167 @@ template <typename Result, typename ArgumentTuple>
|
||||
class InvokeHelper;
|
||||
|
||||
template <typename R>
|
||||
class InvokeHelper<R, ::testing::tuple<> > {
|
||||
class InvokeHelper<R, ::std::tuple<> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::testing::tuple<>&) {
|
||||
static R Invoke(Function function, const ::std::tuple<>&) {
|
||||
return function();
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::testing::tuple<>&) {
|
||||
const ::std::tuple<>&) {
|
||||
return (obj_ptr->*method_ptr)();
|
||||
}
|
||||
|
||||
template <typename CallbackType>
|
||||
static R InvokeCallback(CallbackType* callback,
|
||||
const ::testing::tuple<>&) {
|
||||
const ::std::tuple<>&) {
|
||||
return callback->Run();
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1>
|
||||
class InvokeHelper<R, ::testing::tuple<A1> > {
|
||||
class InvokeHelper<R, ::std::tuple<A1> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::testing::tuple<A1>& args) {
|
||||
return function(get<0>(args));
|
||||
static R Invoke(Function function, const ::std::tuple<A1>& args) {
|
||||
return function(std::get<0>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::testing::tuple<A1>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args));
|
||||
const ::std::tuple<A1>& args) {
|
||||
return (obj_ptr->*method_ptr)(std::get<0>(args));
|
||||
}
|
||||
|
||||
template <typename CallbackType>
|
||||
static R InvokeCallback(CallbackType* callback,
|
||||
const ::testing::tuple<A1>& args) {
|
||||
return callback->Run(get<0>(args));
|
||||
const ::std::tuple<A1>& args) {
|
||||
return callback->Run(std::get<0>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2>
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2> > {
|
||||
class InvokeHelper<R, ::std::tuple<A1, A2> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2>& args) {
|
||||
return function(get<0>(args), get<1>(args));
|
||||
static R Invoke(Function function, const ::std::tuple<A1, A2>& args) {
|
||||
return function(std::get<0>(args), std::get<1>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::testing::tuple<A1, A2>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args));
|
||||
const ::std::tuple<A1, A2>& args) {
|
||||
return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args));
|
||||
}
|
||||
|
||||
template <typename CallbackType>
|
||||
static R InvokeCallback(CallbackType* callback,
|
||||
const ::testing::tuple<A1, A2>& args) {
|
||||
return callback->Run(get<0>(args), get<1>(args));
|
||||
const ::std::tuple<A1, A2>& args) {
|
||||
return callback->Run(std::get<0>(args), std::get<1>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3>
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3> > {
|
||||
class InvokeHelper<R, ::std::tuple<A1, A2, A3> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args));
|
||||
static R Invoke(Function function, const ::std::tuple<A1, A2, A3>& args) {
|
||||
return function(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::testing::tuple<A1, A2, A3>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args));
|
||||
const ::std::tuple<A1, A2, A3>& args) {
|
||||
return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args));
|
||||
}
|
||||
|
||||
template <typename CallbackType>
|
||||
static R InvokeCallback(CallbackType* callback,
|
||||
const ::testing::tuple<A1, A2, A3>& args) {
|
||||
return callback->Run(get<0>(args), get<1>(args), get<2>(args));
|
||||
const ::std::tuple<A1, A2, A3>& args) {
|
||||
return callback->Run(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4>
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4> > {
|
||||
class InvokeHelper<R, ::std::tuple<A1, A2, A3, A4> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3,
|
||||
A4>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args));
|
||||
static R Invoke(Function function, const ::std::tuple<A1, A2, A3, A4>& args) {
|
||||
return function(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::testing::tuple<A1, A2, A3, A4>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args));
|
||||
const ::std::tuple<A1, A2, A3, A4>& args) {
|
||||
return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args));
|
||||
}
|
||||
|
||||
template <typename CallbackType>
|
||||
static R InvokeCallback(CallbackType* callback,
|
||||
const ::testing::tuple<A1, A2, A3, A4>& args) {
|
||||
return callback->Run(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args));
|
||||
const ::std::tuple<A1, A2, A3, A4>& args) {
|
||||
return callback->Run(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5>
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5> > {
|
||||
class InvokeHelper<R, ::std::tuple<A1, A2, A3, A4, A5> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4,
|
||||
static R Invoke(Function function, const ::std::tuple<A1, A2, A3, A4,
|
||||
A5>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args));
|
||||
return function(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args), std::get<4>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::testing::tuple<A1, A2, A3, A4, A5>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args), get<4>(args));
|
||||
const ::std::tuple<A1, A2, A3, A4, A5>& args) {
|
||||
return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args), std::get<4>(args));
|
||||
}
|
||||
|
||||
template <typename CallbackType>
|
||||
static R InvokeCallback(CallbackType* callback,
|
||||
const ::testing::tuple<A1, A2, A3, A4, A5>& args) {
|
||||
return callback->Run(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args));
|
||||
const ::std::tuple<A1, A2, A3, A4, A5>& args) {
|
||||
return callback->Run(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args), std::get<4>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6>
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6> > {
|
||||
class InvokeHelper<R, ::std::tuple<A1, A2, A3, A4, A5, A6> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
|
||||
static R Invoke(Function function, const ::std::tuple<A1, A2, A3, A4, A5,
|
||||
A6>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args));
|
||||
return function(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args), std::get<4>(args),
|
||||
std::get<5>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::testing::tuple<A1, A2, A3, A4, A5, A6>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args), get<4>(args), get<5>(args));
|
||||
const ::std::tuple<A1, A2, A3, A4, A5, A6>& args) {
|
||||
return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args), std::get<4>(args),
|
||||
std::get<5>(args));
|
||||
}
|
||||
|
||||
// There is no InvokeCallback() for 6-tuples
|
||||
@@ -219,23 +222,23 @@ class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6> > {
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7>
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7> > {
|
||||
class InvokeHelper<R, ::std::tuple<A1, A2, A3, A4, A5, A6, A7> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
|
||||
A6, A7>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args), get<6>(args));
|
||||
static R Invoke(Function function, const ::std::tuple<A1, A2, A3, A4, A5, A6,
|
||||
A7>& args) {
|
||||
return function(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args), std::get<4>(args),
|
||||
std::get<5>(args), std::get<6>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::testing::tuple<A1, A2, A3, A4, A5, A6,
|
||||
A7>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args), get<4>(args), get<5>(args),
|
||||
get<6>(args));
|
||||
const ::std::tuple<A1, A2, A3, A4, A5, A6, A7>& args) {
|
||||
return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args), std::get<4>(args),
|
||||
std::get<5>(args), std::get<6>(args));
|
||||
}
|
||||
|
||||
// There is no InvokeCallback() for 7-tuples
|
||||
@@ -243,24 +246,24 @@ class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7> > {
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7, typename A8>
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
|
||||
class InvokeHelper<R, ::std::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
|
||||
A6, A7, A8>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args), get<6>(args),
|
||||
get<7>(args));
|
||||
static R Invoke(Function function, const ::std::tuple<A1, A2, A3, A4, A5, A6,
|
||||
A7, A8>& args) {
|
||||
return function(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args), std::get<4>(args),
|
||||
std::get<5>(args), std::get<6>(args), std::get<7>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::testing::tuple<A1, A2, A3, A4, A5, A6, A7,
|
||||
const ::std::tuple<A1, A2, A3, A4, A5, A6, A7,
|
||||
A8>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args), get<4>(args), get<5>(args),
|
||||
get<6>(args), get<7>(args));
|
||||
return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args), std::get<4>(args),
|
||||
std::get<5>(args), std::get<6>(args), std::get<7>(args));
|
||||
}
|
||||
|
||||
// There is no InvokeCallback() for 8-tuples
|
||||
@@ -268,24 +271,26 @@ class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7, typename A8, typename A9>
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
|
||||
class InvokeHelper<R, ::std::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
|
||||
A6, A7, A8, A9>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args), get<6>(args),
|
||||
get<7>(args), get<8>(args));
|
||||
static R Invoke(Function function, const ::std::tuple<A1, A2, A3, A4, A5, A6,
|
||||
A7, A8, A9>& args) {
|
||||
return function(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args), std::get<4>(args),
|
||||
std::get<5>(args), std::get<6>(args), std::get<7>(args),
|
||||
std::get<8>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
|
||||
const ::std::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
|
||||
A9>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args), get<4>(args), get<5>(args),
|
||||
get<6>(args), get<7>(args), get<8>(args));
|
||||
return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args), std::get<4>(args),
|
||||
std::get<5>(args), std::get<6>(args), std::get<7>(args),
|
||||
std::get<8>(args));
|
||||
}
|
||||
|
||||
// There is no InvokeCallback() for 9-tuples
|
||||
@@ -294,25 +299,26 @@ class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7, typename A8, typename A9,
|
||||
typename A10>
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
|
||||
A10> > {
|
||||
class InvokeHelper<R, ::std::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
|
||||
A6, A7, A8, A9, A10>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args), get<6>(args),
|
||||
get<7>(args), get<8>(args), get<9>(args));
|
||||
static R Invoke(Function function, const ::std::tuple<A1, A2, A3, A4, A5, A6,
|
||||
A7, A8, A9, A10>& args) {
|
||||
return function(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args), std::get<4>(args),
|
||||
std::get<5>(args), std::get<6>(args), std::get<7>(args),
|
||||
std::get<8>(args), std::get<9>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
|
||||
A9, A10>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args), get<4>(args), get<5>(args),
|
||||
get<6>(args), get<7>(args), get<8>(args), get<9>(args));
|
||||
const ::std::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
|
||||
A10>& args) {
|
||||
return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args),
|
||||
std::get<2>(args), std::get<3>(args), std::get<4>(args),
|
||||
std::get<5>(args), std::get<6>(args), std::get<7>(args),
|
||||
std::get<8>(args), std::get<9>(args));
|
||||
}
|
||||
|
||||
// There is no InvokeCallback() for 10-tuples
|
||||
@@ -346,20 +352,20 @@ class InvokeCallbackAction {
|
||||
// An INTERNAL macro for extracting the type of a tuple field. It's
|
||||
// subject to change without notice - DO NOT USE IN USER CODE!
|
||||
#define GMOCK_FIELD_(Tuple, N) \
|
||||
typename ::testing::tuple_element<N, Tuple>::type
|
||||
typename ::std::tuple_element<N, Tuple>::type
|
||||
|
||||
// SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::type is the
|
||||
// type of an n-ary function whose i-th (1-based) argument type is the
|
||||
// k{i}-th (0-based) field of ArgumentTuple, which must be a tuple
|
||||
// type, and whose return type is Result. For example,
|
||||
// SelectArgs<int, ::testing::tuple<bool, char, double, long>, 0, 3>::type
|
||||
// SelectArgs<int, ::std::tuple<bool, char, double, long>, 0, 3>::type
|
||||
// is int(bool, long).
|
||||
//
|
||||
// SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::Select(args)
|
||||
// returns the selected fields (k1, k2, ..., k_n) of args as a tuple.
|
||||
// For example,
|
||||
// SelectArgs<int, tuple<bool, char, double>, 2, 0>::Select(
|
||||
// ::testing::make_tuple(true, 'a', 2.5))
|
||||
// SelectArgs<int, std::tuple<bool, char, double>, 2, 0>::Select(
|
||||
// ::std::make_tuple(true, 'a', 2.5))
|
||||
// returns tuple (2.5, true).
|
||||
//
|
||||
// The numbers in list k1, k2, ..., k_n must be >= 0, where n can be
|
||||
@@ -378,9 +384,10 @@ class SelectArgs {
|
||||
GMOCK_FIELD_(ArgumentTuple, k10));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
|
||||
get<k8>(args), get<k9>(args), get<k10>(args));
|
||||
return SelectedArgs(std::get<k1>(args), std::get<k2>(args),
|
||||
std::get<k3>(args), std::get<k4>(args), std::get<k5>(args),
|
||||
std::get<k6>(args), std::get<k7>(args), std::get<k8>(args),
|
||||
std::get<k9>(args), std::get<k10>(args));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -402,7 +409,7 @@ class SelectArgs<Result, ArgumentTuple,
|
||||
typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
return SelectedArgs(get<k1>(args));
|
||||
return SelectedArgs(std::get<k1>(args));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -414,7 +421,7 @@ class SelectArgs<Result, ArgumentTuple,
|
||||
GMOCK_FIELD_(ArgumentTuple, k2));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args));
|
||||
return SelectedArgs(std::get<k1>(args), std::get<k2>(args));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -426,7 +433,8 @@ class SelectArgs<Result, ArgumentTuple,
|
||||
GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args));
|
||||
return SelectedArgs(std::get<k1>(args), std::get<k2>(args),
|
||||
std::get<k3>(args));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -440,8 +448,8 @@ class SelectArgs<Result, ArgumentTuple,
|
||||
GMOCK_FIELD_(ArgumentTuple, k4));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args));
|
||||
return SelectedArgs(std::get<k1>(args), std::get<k2>(args),
|
||||
std::get<k3>(args), std::get<k4>(args));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -455,8 +463,8 @@ class SelectArgs<Result, ArgumentTuple,
|
||||
GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args), get<k5>(args));
|
||||
return SelectedArgs(std::get<k1>(args), std::get<k2>(args),
|
||||
std::get<k3>(args), std::get<k4>(args), std::get<k5>(args));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -471,8 +479,9 @@ class SelectArgs<Result, ArgumentTuple,
|
||||
GMOCK_FIELD_(ArgumentTuple, k6));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args), get<k5>(args), get<k6>(args));
|
||||
return SelectedArgs(std::get<k1>(args), std::get<k2>(args),
|
||||
std::get<k3>(args), std::get<k4>(args), std::get<k5>(args),
|
||||
std::get<k6>(args));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -487,8 +496,9 @@ class SelectArgs<Result, ArgumentTuple,
|
||||
GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args));
|
||||
return SelectedArgs(std::get<k1>(args), std::get<k2>(args),
|
||||
std::get<k3>(args), std::get<k4>(args), std::get<k5>(args),
|
||||
std::get<k6>(args), std::get<k7>(args));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -504,9 +514,9 @@ class SelectArgs<Result, ArgumentTuple,
|
||||
GMOCK_FIELD_(ArgumentTuple, k8));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
|
||||
get<k8>(args));
|
||||
return SelectedArgs(std::get<k1>(args), std::get<k2>(args),
|
||||
std::get<k3>(args), std::get<k4>(args), std::get<k5>(args),
|
||||
std::get<k6>(args), std::get<k7>(args), std::get<k8>(args));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -522,9 +532,10 @@ class SelectArgs<Result, ArgumentTuple,
|
||||
GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
|
||||
get<k8>(args), get<k9>(args));
|
||||
return SelectedArgs(std::get<k1>(args), std::get<k2>(args),
|
||||
std::get<k3>(args), std::get<k4>(args), std::get<k5>(args),
|
||||
std::get<k6>(args), std::get<k7>(args), std::get<k8>(args),
|
||||
std::get<k9>(args));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -587,7 +598,7 @@ struct ExcessiveArg {};
|
||||
template <typename Result, class Impl>
|
||||
class ActionHelper {
|
||||
public:
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<>& args) {
|
||||
static Result Perform(Impl* impl, const ::std::tuple<>& args) {
|
||||
return impl->template gmock_PerformImpl<>(args, ExcessiveArg(),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
@@ -595,95 +606,96 @@ class ActionHelper {
|
||||
}
|
||||
|
||||
template <typename A0>
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0>& args) {
|
||||
return impl->template gmock_PerformImpl<A0>(args, get<0>(args),
|
||||
static Result Perform(Impl* impl, const ::std::tuple<A0>& args) {
|
||||
return impl->template gmock_PerformImpl<A0>(args, std::get<0>(args),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg());
|
||||
}
|
||||
|
||||
template <typename A0, typename A1>
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1>(args, get<0>(args),
|
||||
get<1>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
static Result Perform(Impl* impl, const ::std::tuple<A0, A1>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1>(args, std::get<0>(args),
|
||||
std::get<1>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg());
|
||||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2>
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2>(args, get<0>(args),
|
||||
get<1>(args), get<2>(args), ExcessiveArg(), ExcessiveArg(),
|
||||
static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2>(args,
|
||||
std::get<0>(args), std::get<1>(args), std::get<2>(args),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg());
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg());
|
||||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2, typename A3>
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2,
|
||||
A3>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3>(args, get<0>(args),
|
||||
get<1>(args), get<2>(args), get<3>(args), ExcessiveArg(),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg());
|
||||
static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3>(args,
|
||||
std::get<0>(args), std::get<1>(args), std::get<2>(args),
|
||||
std::get<3>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg());
|
||||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2, typename A3, typename A4>
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3,
|
||||
static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3,
|
||||
A4>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4>(args,
|
||||
get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg());
|
||||
std::get<0>(args), std::get<1>(args), std::get<2>(args),
|
||||
std::get<3>(args), std::get<4>(args), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg());
|
||||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5>
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
|
||||
static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3, A4,
|
||||
A5>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5>(args,
|
||||
get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
|
||||
get<5>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg());
|
||||
std::get<0>(args), std::get<1>(args), std::get<2>(args),
|
||||
std::get<3>(args), std::get<4>(args), std::get<5>(args),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg());
|
||||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6>
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
|
||||
A5, A6>& args) {
|
||||
static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3, A4, A5,
|
||||
A6>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6>(args,
|
||||
get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
|
||||
get<5>(args), get<6>(args), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg());
|
||||
std::get<0>(args), std::get<1>(args), std::get<2>(args),
|
||||
std::get<3>(args), std::get<4>(args), std::get<5>(args),
|
||||
std::get<6>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg());
|
||||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7>
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
|
||||
A5, A6, A7>& args) {
|
||||
static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3, A4, A5,
|
||||
A6, A7>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6,
|
||||
A7>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
|
||||
get<4>(args), get<5>(args), get<6>(args), get<7>(args), ExcessiveArg(),
|
||||
ExcessiveArg());
|
||||
A7>(args, std::get<0>(args), std::get<1>(args), std::get<2>(args),
|
||||
std::get<3>(args), std::get<4>(args), std::get<5>(args),
|
||||
std::get<6>(args), std::get<7>(args), ExcessiveArg(), ExcessiveArg());
|
||||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7, typename A8>
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
|
||||
A5, A6, A7, A8>& args) {
|
||||
static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3, A4, A5,
|
||||
A6, A7, A8>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7,
|
||||
A8>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
|
||||
get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
|
||||
A8>(args, std::get<0>(args), std::get<1>(args), std::get<2>(args),
|
||||
std::get<3>(args), std::get<4>(args), std::get<5>(args),
|
||||
std::get<6>(args), std::get<7>(args), std::get<8>(args),
|
||||
ExcessiveArg());
|
||||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7, typename A8, typename A9>
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
|
||||
A5, A6, A7, A8, A9>& args) {
|
||||
static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3, A4, A5,
|
||||
A6, A7, A8, A9>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7, A8,
|
||||
A9>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
|
||||
get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
|
||||
get<9>(args));
|
||||
A9>(args, std::get<0>(args), std::get<1>(args), std::get<2>(args),
|
||||
std::get<3>(args), std::get<4>(args), std::get<5>(args),
|
||||
std::get<6>(args), std::get<7>(args), std::get<8>(args),
|
||||
std::get<9>(args));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -950,8 +962,8 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
|
||||
//
|
||||
// MORE INFORMATION:
|
||||
//
|
||||
// To learn more about using these macros, please search for 'ACTION'
|
||||
// on https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md
|
||||
// To learn more about using these macros, please search for 'ACTION' on
|
||||
// https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md
|
||||
|
||||
// An internal macro needed for implementing ACTION*().
|
||||
#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\
|
||||
@@ -991,7 +1003,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
|
||||
// ACTION_TEMPLATE(DuplicateArg,
|
||||
// HAS_2_TEMPLATE_PARAMS(int, k, typename, T),
|
||||
// AND_1_VALUE_PARAMS(output)) {
|
||||
// *output = T(::testing::get<k>(args));
|
||||
// *output = T(::std::get<k>(args));
|
||||
// }
|
||||
// ...
|
||||
// int n;
|
||||
@@ -2389,7 +2401,7 @@ ACTION_TEMPLATE(InvokeArgument,
|
||||
using internal::invoke_argument::InvokeArgumentAdl;
|
||||
return InvokeArgumentAdl<return_type>(
|
||||
internal::invoke_argument::AdlTag(),
|
||||
::testing::get<k>(args));
|
||||
::std::get<k>(args));
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
@@ -2398,7 +2410,7 @@ ACTION_TEMPLATE(InvokeArgument,
|
||||
using internal::invoke_argument::InvokeArgumentAdl;
|
||||
return InvokeArgumentAdl<return_type>(
|
||||
internal::invoke_argument::AdlTag(),
|
||||
::testing::get<k>(args), p0);
|
||||
::std::get<k>(args), p0);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
@@ -2407,7 +2419,7 @@ ACTION_TEMPLATE(InvokeArgument,
|
||||
using internal::invoke_argument::InvokeArgumentAdl;
|
||||
return InvokeArgumentAdl<return_type>(
|
||||
internal::invoke_argument::AdlTag(),
|
||||
::testing::get<k>(args), p0, p1);
|
||||
::std::get<k>(args), p0, p1);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
@@ -2416,7 +2428,7 @@ ACTION_TEMPLATE(InvokeArgument,
|
||||
using internal::invoke_argument::InvokeArgumentAdl;
|
||||
return InvokeArgumentAdl<return_type>(
|
||||
internal::invoke_argument::AdlTag(),
|
||||
::testing::get<k>(args), p0, p1, p2);
|
||||
::std::get<k>(args), p0, p1, p2);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
@@ -2425,7 +2437,7 @@ ACTION_TEMPLATE(InvokeArgument,
|
||||
using internal::invoke_argument::InvokeArgumentAdl;
|
||||
return InvokeArgumentAdl<return_type>(
|
||||
internal::invoke_argument::AdlTag(),
|
||||
::testing::get<k>(args), p0, p1, p2, p3);
|
||||
::std::get<k>(args), p0, p1, p2, p3);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
@@ -2434,7 +2446,7 @@ ACTION_TEMPLATE(InvokeArgument,
|
||||
using internal::invoke_argument::InvokeArgumentAdl;
|
||||
return InvokeArgumentAdl<return_type>(
|
||||
internal::invoke_argument::AdlTag(),
|
||||
::testing::get<k>(args), p0, p1, p2, p3, p4);
|
||||
::std::get<k>(args), p0, p1, p2, p3, p4);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
@@ -2443,7 +2455,7 @@ ACTION_TEMPLATE(InvokeArgument,
|
||||
using internal::invoke_argument::InvokeArgumentAdl;
|
||||
return InvokeArgumentAdl<return_type>(
|
||||
internal::invoke_argument::AdlTag(),
|
||||
::testing::get<k>(args), p0, p1, p2, p3, p4, p5);
|
||||
::std::get<k>(args), p0, p1, p2, p3, p4, p5);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
@@ -2452,7 +2464,7 @@ ACTION_TEMPLATE(InvokeArgument,
|
||||
using internal::invoke_argument::InvokeArgumentAdl;
|
||||
return InvokeArgumentAdl<return_type>(
|
||||
internal::invoke_argument::AdlTag(),
|
||||
::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6);
|
||||
::std::get<k>(args), p0, p1, p2, p3, p4, p5, p6);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
@@ -2461,7 +2473,7 @@ ACTION_TEMPLATE(InvokeArgument,
|
||||
using internal::invoke_argument::InvokeArgumentAdl;
|
||||
return InvokeArgumentAdl<return_type>(
|
||||
internal::invoke_argument::AdlTag(),
|
||||
::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7);
|
||||
::std::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
@@ -2470,7 +2482,7 @@ ACTION_TEMPLATE(InvokeArgument,
|
||||
using internal::invoke_argument::InvokeArgumentAdl;
|
||||
return InvokeArgumentAdl<return_type>(
|
||||
internal::invoke_argument::AdlTag(),
|
||||
::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
::std::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
@@ -2479,7 +2491,7 @@ ACTION_TEMPLATE(InvokeArgument,
|
||||
using internal::invoke_argument::InvokeArgumentAdl;
|
||||
return InvokeArgumentAdl<return_type>(
|
||||
internal::invoke_argument::AdlTag(),
|
||||
::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
|
||||
::std::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
|
||||
}
|
||||
|
||||
// Various overloads for ReturnNew<T>().
|
||||
|
||||
@@ -63,19 +63,19 @@ $range j 1..i
|
||||
$var types = [[$for j [[, typename A$j]]]]
|
||||
$var as = [[$for j, [[A$j]]]]
|
||||
$var args = [[$if i==0 [[]] $else [[ args]]]]
|
||||
$var gets = [[$for j, [[get<$(j - 1)>(args)]]]]
|
||||
$var gets = [[$for j, [[std::get<$(j - 1)>(args)]]]]
|
||||
template <typename R$types>
|
||||
class InvokeHelper<R, ::testing::tuple<$as> > {
|
||||
class InvokeHelper<R, ::std::tuple<$as> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::testing::tuple<$as>&$args) {
|
||||
static R Invoke(Function function, const ::std::tuple<$as>&$args) {
|
||||
return function($gets);
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::testing::tuple<$as>&$args) {
|
||||
const ::std::tuple<$as>&$args) {
|
||||
return (obj_ptr->*method_ptr)($gets);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ class InvokeHelper<R, ::testing::tuple<$as> > {
|
||||
$if i <= max_callback_arity [[
|
||||
template <typename CallbackType>
|
||||
static R InvokeCallback(CallbackType* callback,
|
||||
const ::testing::tuple<$as>&$args) {
|
||||
const ::std::tuple<$as>&$args) {
|
||||
return callback->Run($gets);
|
||||
}
|
||||
]] $else [[
|
||||
@@ -122,7 +122,7 @@ class InvokeCallbackAction {
|
||||
// An INTERNAL macro for extracting the type of a tuple field. It's
|
||||
// subject to change without notice - DO NOT USE IN USER CODE!
|
||||
#define GMOCK_FIELD_(Tuple, N) \
|
||||
typename ::testing::tuple_element<N, Tuple>::type
|
||||
typename ::std::tuple_element<N, Tuple>::type
|
||||
|
||||
$range i 1..n
|
||||
|
||||
@@ -130,14 +130,14 @@ $range i 1..n
|
||||
// type of an n-ary function whose i-th (1-based) argument type is the
|
||||
// k{i}-th (0-based) field of ArgumentTuple, which must be a tuple
|
||||
// type, and whose return type is Result. For example,
|
||||
// SelectArgs<int, ::testing::tuple<bool, char, double, long>, 0, 3>::type
|
||||
// SelectArgs<int, ::std::tuple<bool, char, double, long>, 0, 3>::type
|
||||
// is int(bool, long).
|
||||
//
|
||||
// SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::Select(args)
|
||||
// returns the selected fields (k1, k2, ..., k_n) of args as a tuple.
|
||||
// For example,
|
||||
// SelectArgs<int, tuple<bool, char, double>, 2, 0>::Select(
|
||||
// ::testing::make_tuple(true, 'a', 2.5))
|
||||
// SelectArgs<int, std::tuple<bool, char, double>, 2, 0>::Select(
|
||||
// ::std::make_tuple(true, 'a', 2.5))
|
||||
// returns tuple (2.5, true).
|
||||
//
|
||||
// The numbers in list k1, k2, ..., k_n must be >= 0, where n can be
|
||||
@@ -150,7 +150,7 @@ class SelectArgs {
|
||||
typedef Result type($for i, [[GMOCK_FIELD_(ArgumentTuple, k$i)]]);
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
return SelectedArgs($for i, [[get<k$i>(args)]]);
|
||||
return SelectedArgs($for i, [[std::get<k$i>(args)]]);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -166,7 +166,7 @@ class SelectArgs<Result, ArgumentTuple,
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& [[]]
|
||||
$if i == 1 [[/* args */]] $else [[args]]) {
|
||||
return SelectedArgs($for j1, [[get<k$j1>(args)]]);
|
||||
return SelectedArgs($for j1, [[std::get<k$j1>(args)]]);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -240,12 +240,12 @@ $range j 0..i-1
|
||||
]]]]
|
||||
$range j 0..i-1
|
||||
$var As = [[$for j, [[A$j]]]]
|
||||
$var as = [[$for j, [[get<$j>(args)]]]]
|
||||
$var as = [[$for j, [[std::get<$j>(args)]]]]
|
||||
$range k 1..n-i
|
||||
$var eas = [[$for k, [[ExcessiveArg()]]]]
|
||||
$var arg_list = [[$if (i==0) | (i==n) [[$as$eas]] $else [[$as, $eas]]]]
|
||||
$template
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<$As>& args) {
|
||||
static Result Perform(Impl* impl, const ::std::tuple<$As>& args) {
|
||||
return impl->template gmock_PerformImpl<$As>(args, $arg_list);
|
||||
}
|
||||
|
||||
@@ -395,8 +395,8 @@ $range j2 2..i
|
||||
//
|
||||
// MORE INFORMATION:
|
||||
//
|
||||
// To learn more about using these macros, please search for 'ACTION'
|
||||
// on https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md
|
||||
// To learn more about using these macros, please search for 'ACTION' on
|
||||
// https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md
|
||||
|
||||
$range i 0..n
|
||||
$range k 0..n-1
|
||||
@@ -432,7 +432,7 @@ $for k [[, \
|
||||
// ACTION_TEMPLATE(DuplicateArg,
|
||||
// HAS_2_TEMPLATE_PARAMS(int, k, typename, T),
|
||||
// AND_1_VALUE_PARAMS(output)) {
|
||||
// *output = T(::testing::get<k>(args));
|
||||
// *output = T(::std::get<k>(args));
|
||||
// }
|
||||
// ...
|
||||
// int n;
|
||||
@@ -796,7 +796,7 @@ ACTION_TEMPLATE(InvokeArgument,
|
||||
using internal::invoke_argument::InvokeArgumentAdl;
|
||||
return InvokeArgumentAdl<return_type>(
|
||||
internal::invoke_argument::AdlTag(),
|
||||
::testing::get<k>(args)$for j [[, p$j]]);
|
||||
::std::get<k>(args)$for j [[, p$j]]);
|
||||
}
|
||||
|
||||
]]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -81,7 +81,7 @@ class FunctionMocker<R($As)> : public
|
||||
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
||||
|
||||
MockSpec<F> With($matchers) {
|
||||
return MockSpec<F>(this, ::testing::make_tuple($ms));
|
||||
return MockSpec<F>(this, ::std::make_tuple($ms));
|
||||
}
|
||||
|
||||
R Invoke($Aas) {
|
||||
@@ -194,7 +194,7 @@ $var anything_matchers = [[$for j, \
|
||||
#define GMOCK_METHOD$i[[]]_(tn, constness, ct, Method, ...) \
|
||||
GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
|
||||
$arg_as) constness { \
|
||||
GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
|
||||
GTEST_COMPILE_ASSERT_((::std::tuple_size< \
|
||||
tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == $i), \
|
||||
this_method_does_not_take_$i[[]]_argument[[$if i != 1 [[s]]]]); \
|
||||
GMOCK_MOCKER_($i, constness, Method).SetOwnerAndName(this, #Method); \
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace internal {
|
||||
|
||||
// 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:
|
||||
@@ -59,10 +59,11 @@ namespace internal {
|
||||
// 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, int k0 = -1, int k1 = -1, int k2 = -1, int k3 = -1,
|
||||
int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1,
|
||||
@@ -74,15 +75,15 @@ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
|
||||
int k7, int k8, int k9>
|
||||
class TupleFields {
|
||||
public:
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k9)> type;
|
||||
typedef ::std::tuple<GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple,
|
||||
k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k4), GMOCK_FIELD_TYPE_(Tuple, k5),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k6), GMOCK_FIELD_TYPE_(Tuple, k7),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k8), GMOCK_FIELD_TYPE_(Tuple, k9)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
|
||||
get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t), get<k9>(t));
|
||||
return type(std::get<k0>(t), std::get<k1>(t), std::get<k2>(t),
|
||||
std::get<k3>(t), std::get<k4>(t), std::get<k5>(t), std::get<k6>(t),
|
||||
std::get<k7>(t), std::get<k8>(t), std::get<k9>(t));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -91,7 +92,7 @@ class TupleFields {
|
||||
template <class Tuple>
|
||||
class TupleFields<Tuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::testing::tuple<> type;
|
||||
typedef ::std::tuple<> type;
|
||||
static type GetSelectedFields(const Tuple& /* t */) {
|
||||
return type();
|
||||
}
|
||||
@@ -100,77 +101,77 @@ class TupleFields<Tuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
|
||||
template <class Tuple, int k0>
|
||||
class TupleFields<Tuple, k0, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0)> type;
|
||||
typedef ::std::tuple<GMOCK_FIELD_TYPE_(Tuple, k0)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
return type(get<k0>(t));
|
||||
return type(std::get<k0>(t));
|
||||
}
|
||||
};
|
||||
|
||||
template <class Tuple, int k0, int k1>
|
||||
class TupleFields<Tuple, k0, k1, -1, -1, -1, -1, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1)> type;
|
||||
typedef ::std::tuple<GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple,
|
||||
k1)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
return type(get<k0>(t), get<k1>(t));
|
||||
return type(std::get<k0>(t), std::get<k1>(t));
|
||||
}
|
||||
};
|
||||
|
||||
template <class Tuple, int k0, int k1, int k2>
|
||||
class TupleFields<Tuple, k0, k1, k2, -1, -1, -1, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2)> type;
|
||||
typedef ::std::tuple<GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple,
|
||||
k1), GMOCK_FIELD_TYPE_(Tuple, k2)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t));
|
||||
return type(std::get<k0>(t), std::get<k1>(t), std::get<k2>(t));
|
||||
}
|
||||
};
|
||||
|
||||
template <class Tuple, int k0, int k1, int k2, int k3>
|
||||
class TupleFields<Tuple, k0, k1, k2, k3, -1, -1, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3)> type;
|
||||
typedef ::std::tuple<GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple,
|
||||
k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t));
|
||||
return type(std::get<k0>(t), std::get<k1>(t), std::get<k2>(t),
|
||||
std::get<k3>(t));
|
||||
}
|
||||
};
|
||||
|
||||
template <class Tuple, int k0, int k1, int k2, int k3, int k4>
|
||||
class TupleFields<Tuple, k0, k1, k2, k3, k4, -1, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4)> type;
|
||||
typedef ::std::tuple<GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple,
|
||||
k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k4)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t));
|
||||
return type(std::get<k0>(t), std::get<k1>(t), std::get<k2>(t),
|
||||
std::get<k3>(t), std::get<k4>(t));
|
||||
}
|
||||
};
|
||||
|
||||
template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5>
|
||||
class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k5)> type;
|
||||
typedef ::std::tuple<GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple,
|
||||
k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k4), GMOCK_FIELD_TYPE_(Tuple, k5)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
|
||||
get<k5>(t));
|
||||
return type(std::get<k0>(t), std::get<k1>(t), std::get<k2>(t),
|
||||
std::get<k3>(t), std::get<k4>(t), std::get<k5>(t));
|
||||
}
|
||||
};
|
||||
|
||||
template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6>
|
||||
class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6)> type;
|
||||
typedef ::std::tuple<GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple,
|
||||
k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k4), GMOCK_FIELD_TYPE_(Tuple, k5),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k6)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
|
||||
get<k5>(t), get<k6>(t));
|
||||
return type(std::get<k0>(t), std::get<k1>(t), std::get<k2>(t),
|
||||
std::get<k3>(t), std::get<k4>(t), std::get<k5>(t), std::get<k6>(t));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -178,14 +179,14 @@ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
|
||||
int k7>
|
||||
class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, -1, -1> {
|
||||
public:
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k7)> type;
|
||||
typedef ::std::tuple<GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple,
|
||||
k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k4), GMOCK_FIELD_TYPE_(Tuple, k5),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k6), GMOCK_FIELD_TYPE_(Tuple, k7)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
|
||||
get<k5>(t), get<k6>(t), get<k7>(t));
|
||||
return type(std::get<k0>(t), std::get<k1>(t), std::get<k2>(t),
|
||||
std::get<k3>(t), std::get<k4>(t), std::get<k5>(t), std::get<k6>(t),
|
||||
std::get<k7>(t));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -193,14 +194,15 @@ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
|
||||
int k7, int k8>
|
||||
class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, k8, -1> {
|
||||
public:
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8)> type;
|
||||
typedef ::std::tuple<GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple,
|
||||
k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k4), GMOCK_FIELD_TYPE_(Tuple, k5),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k6), GMOCK_FIELD_TYPE_(Tuple, k7),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k8)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
|
||||
get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t));
|
||||
return type(std::get<k0>(t), std::get<k1>(t), std::get<k2>(t),
|
||||
std::get<k3>(t), std::get<k4>(t), std::get<k5>(t), std::get<k6>(t),
|
||||
std::get<k7>(t), std::get<k8>(t));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -466,6 +468,7 @@ Args(const InnerMatcher& matcher) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// AnyOf(m1, m2, ..., mk) matches any value that matches any of the given
|
||||
// sub-matchers. AnyOf is called fully qualified to prevent ADL from firing.
|
||||
|
||||
@@ -795,7 +798,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
||||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::testing::tuple<>()));\
|
||||
::std::tuple<>()));\
|
||||
}\
|
||||
};\
|
||||
template <typename arg_type>\
|
||||
@@ -845,7 +848,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
||||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::testing::tuple<p0##_type>(p0)));\
|
||||
::std::tuple<p0##_type>(p0)));\
|
||||
}\
|
||||
};\
|
||||
template <typename arg_type>\
|
||||
@@ -901,7 +904,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
||||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::testing::tuple<p0##_type, p1##_type>(p0, p1)));\
|
||||
::std::tuple<p0##_type, p1##_type>(p0, p1)));\
|
||||
}\
|
||||
};\
|
||||
template <typename arg_type>\
|
||||
@@ -963,8 +966,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
||||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type>(p0, p1, \
|
||||
p2)));\
|
||||
::std::tuple<p0##_type, p1##_type, p2##_type>(p0, p1, p2)));\
|
||||
}\
|
||||
};\
|
||||
template <typename arg_type>\
|
||||
@@ -1032,8 +1034,8 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
||||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, \
|
||||
p3##_type>(p0, p1, p2, p3)));\
|
||||
::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type>(p0, \
|
||||
p1, p2, p3)));\
|
||||
}\
|
||||
};\
|
||||
template <typename arg_type>\
|
||||
@@ -1110,7 +1112,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
||||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
p4##_type>(p0, p1, p2, p3, p4)));\
|
||||
}\
|
||||
};\
|
||||
@@ -1192,7 +1194,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
||||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5)));\
|
||||
}\
|
||||
};\
|
||||
@@ -1280,7 +1282,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
||||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, \
|
||||
p6)));\
|
||||
}\
|
||||
@@ -1377,7 +1379,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
||||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, \
|
||||
p3, p4, p5, p6, p7)));\
|
||||
}\
|
||||
@@ -1480,7 +1482,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
||||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
p4##_type, p5##_type, p6##_type, p7##_type, \
|
||||
p8##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8)));\
|
||||
}\
|
||||
@@ -1590,7 +1592,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
||||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
|
||||
p9##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)));\
|
||||
}\
|
||||
|
||||
@@ -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>\
|
||||
|
||||
@@ -905,8 +905,8 @@ class TuplePrefix {
|
||||
template <typename MatcherTuple, typename ValueTuple>
|
||||
static bool Matches(const MatcherTuple& matcher_tuple,
|
||||
const ValueTuple& value_tuple) {
|
||||
return TuplePrefix<N - 1>::Matches(matcher_tuple, value_tuple)
|
||||
&& get<N - 1>(matcher_tuple).Matches(get<N - 1>(value_tuple));
|
||||
return TuplePrefix<N - 1>::Matches(matcher_tuple, value_tuple) &&
|
||||
std::get<N - 1>(matcher_tuple).Matches(std::get<N - 1>(value_tuple));
|
||||
}
|
||||
|
||||
// TuplePrefix<N>::ExplainMatchFailuresTo(matchers, values, os)
|
||||
@@ -922,16 +922,16 @@ class TuplePrefix {
|
||||
|
||||
// Then describes the failure (if any) in the (N - 1)-th (0-based)
|
||||
// field.
|
||||
typename tuple_element<N - 1, MatcherTuple>::type matcher =
|
||||
get<N - 1>(matchers);
|
||||
typedef typename tuple_element<N - 1, ValueTuple>::type Value;
|
||||
GTEST_REFERENCE_TO_CONST_(Value) value = get<N - 1>(values);
|
||||
typename std::tuple_element<N - 1, MatcherTuple>::type matcher =
|
||||
std::get<N - 1>(matchers);
|
||||
typedef typename std::tuple_element<N - 1, ValueTuple>::type Value;
|
||||
GTEST_REFERENCE_TO_CONST_(Value) value = std::get<N - 1>(values);
|
||||
StringMatchResultListener listener;
|
||||
if (!matcher.MatchAndExplain(value, &listener)) {
|
||||
// FIXME: include in the message the name of the parameter
|
||||
// as used in MOCK_METHOD*() when possible.
|
||||
*os << " Expected arg #" << N - 1 << ": ";
|
||||
get<N - 1>(matchers).DescribeTo(os);
|
||||
std::get<N - 1>(matchers).DescribeTo(os);
|
||||
*os << "\n Actual: ";
|
||||
// We remove the reference in type Value to prevent the
|
||||
// universal printer from printing the address of value, which
|
||||
@@ -971,11 +971,11 @@ bool TupleMatches(const MatcherTuple& matcher_tuple,
|
||||
const ValueTuple& value_tuple) {
|
||||
// Makes sure that matcher_tuple and value_tuple have the same
|
||||
// number of fields.
|
||||
GTEST_COMPILE_ASSERT_(tuple_size<MatcherTuple>::value ==
|
||||
tuple_size<ValueTuple>::value,
|
||||
GTEST_COMPILE_ASSERT_(std::tuple_size<MatcherTuple>::value ==
|
||||
std::tuple_size<ValueTuple>::value,
|
||||
matcher_and_value_have_different_numbers_of_fields);
|
||||
return TuplePrefix<tuple_size<ValueTuple>::value>::
|
||||
Matches(matcher_tuple, value_tuple);
|
||||
return TuplePrefix<std::tuple_size<ValueTuple>::value>::Matches(matcher_tuple,
|
||||
value_tuple);
|
||||
}
|
||||
|
||||
// Describes failures in matching matchers against values. If there
|
||||
@@ -984,7 +984,7 @@ template <typename MatcherTuple, typename ValueTuple>
|
||||
void ExplainMatchFailureTupleTo(const MatcherTuple& matchers,
|
||||
const ValueTuple& values,
|
||||
::std::ostream* os) {
|
||||
TuplePrefix<tuple_size<MatcherTuple>::value>::ExplainMatchFailuresTo(
|
||||
TuplePrefix<std::tuple_size<MatcherTuple>::value>::ExplainMatchFailuresTo(
|
||||
matchers, values, os);
|
||||
}
|
||||
|
||||
@@ -995,7 +995,7 @@ void ExplainMatchFailureTupleTo(const MatcherTuple& matchers,
|
||||
template <typename Tuple, typename Func, typename OutIter>
|
||||
class TransformTupleValuesHelper {
|
||||
private:
|
||||
typedef ::testing::tuple_size<Tuple> TupleSize;
|
||||
typedef ::std::tuple_size<Tuple> TupleSize;
|
||||
|
||||
public:
|
||||
// For each member of tuple 't', taken in order, evaluates '*out++ = f(t)'.
|
||||
@@ -1008,7 +1008,7 @@ class TransformTupleValuesHelper {
|
||||
template <typename Tup, size_t kRemainingSize>
|
||||
struct IterateOverTuple {
|
||||
OutIter operator() (Func f, const Tup& t, OutIter out) const {
|
||||
*out++ = f(::testing::get<TupleSize::value - kRemainingSize>(t));
|
||||
*out++ = f(::std::get<TupleSize::value - kRemainingSize>(t));
|
||||
return IterateOverTuple<Tup, kRemainingSize - 1>()(f, t, out);
|
||||
}
|
||||
};
|
||||
@@ -1597,19 +1597,19 @@ class MatchesRegexMatcher {
|
||||
// compared don't have to have the same type.
|
||||
//
|
||||
// The matcher defined here is polymorphic (for example, Eq() can be
|
||||
// used to match a tuple<int, short>, a tuple<const long&, double>,
|
||||
// used to match a std::tuple<int, short>, a std::tuple<const long&, double>,
|
||||
// etc). Therefore we use a template type conversion operator in the
|
||||
// implementation.
|
||||
template <typename D, typename Op>
|
||||
class PairMatchBase {
|
||||
public:
|
||||
template <typename T1, typename T2>
|
||||
operator Matcher< ::testing::tuple<T1, T2> >() const {
|
||||
return MakeMatcher(new Impl< ::testing::tuple<T1, T2> >);
|
||||
operator Matcher<::std::tuple<T1, T2>>() const {
|
||||
return MakeMatcher(new Impl<::std::tuple<T1, T2>>);
|
||||
}
|
||||
template <typename T1, typename T2>
|
||||
operator Matcher<const ::testing::tuple<T1, T2>&>() const {
|
||||
return MakeMatcher(new Impl<const ::testing::tuple<T1, T2>&>);
|
||||
operator Matcher<const ::std::tuple<T1, T2>&>() const {
|
||||
return MakeMatcher(new Impl<const ::std::tuple<T1, T2>&>);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -1623,7 +1623,7 @@ class PairMatchBase {
|
||||
virtual bool MatchAndExplain(
|
||||
Tuple args,
|
||||
MatchResultListener* /* listener */) const {
|
||||
return Op()(::testing::get<0>(args), ::testing::get<1>(args));
|
||||
return Op()(::std::get<0>(args), ::std::get<1>(args));
|
||||
}
|
||||
virtual void DescribeTo(::std::ostream* os) const {
|
||||
*os << "are " << GetDesc;
|
||||
@@ -1807,7 +1807,7 @@ class VariadicMatcher {
|
||||
std::vector<Matcher<T> >*,
|
||||
std::integral_constant<size_t, sizeof...(Args)>) const {}
|
||||
|
||||
tuple<Args...> matchers_;
|
||||
std::tuple<Args...> matchers_;
|
||||
|
||||
GTEST_DISALLOW_ASSIGN_(VariadicMatcher);
|
||||
};
|
||||
@@ -2220,14 +2220,14 @@ class FloatingEq2Matcher {
|
||||
}
|
||||
|
||||
template <typename T1, typename T2>
|
||||
operator Matcher< ::testing::tuple<T1, T2> >() const {
|
||||
operator Matcher<::std::tuple<T1, T2>>() const {
|
||||
return MakeMatcher(
|
||||
new Impl< ::testing::tuple<T1, T2> >(max_abs_error_, nan_eq_nan_));
|
||||
new Impl<::std::tuple<T1, T2>>(max_abs_error_, nan_eq_nan_));
|
||||
}
|
||||
template <typename T1, typename T2>
|
||||
operator Matcher<const ::testing::tuple<T1, T2>&>() const {
|
||||
operator Matcher<const ::std::tuple<T1, T2>&>() const {
|
||||
return MakeMatcher(
|
||||
new Impl<const ::testing::tuple<T1, T2>&>(max_abs_error_, nan_eq_nan_));
|
||||
new Impl<const ::std::tuple<T1, T2>&>(max_abs_error_, nan_eq_nan_));
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -2245,14 +2245,14 @@ class FloatingEq2Matcher {
|
||||
virtual bool MatchAndExplain(Tuple args,
|
||||
MatchResultListener* listener) const {
|
||||
if (max_abs_error_ == -1) {
|
||||
FloatingEqMatcher<FloatType> fm(::testing::get<0>(args), nan_eq_nan_);
|
||||
return static_cast<Matcher<FloatType> >(fm).MatchAndExplain(
|
||||
::testing::get<1>(args), listener);
|
||||
FloatingEqMatcher<FloatType> fm(::std::get<0>(args), nan_eq_nan_);
|
||||
return static_cast<Matcher<FloatType>>(fm).MatchAndExplain(
|
||||
::std::get<1>(args), listener);
|
||||
} else {
|
||||
FloatingEqMatcher<FloatType> fm(::testing::get<0>(args), nan_eq_nan_,
|
||||
FloatingEqMatcher<FloatType> fm(::std::get<0>(args), nan_eq_nan_,
|
||||
max_abs_error_);
|
||||
return static_cast<Matcher<FloatType> >(fm).MatchAndExplain(
|
||||
::testing::get<1>(args), listener);
|
||||
return static_cast<Matcher<FloatType>>(fm).MatchAndExplain(
|
||||
::std::get<1>(args), listener);
|
||||
}
|
||||
}
|
||||
virtual void DescribeTo(::std::ostream* os) const {
|
||||
@@ -2956,7 +2956,7 @@ class WhenSortedByMatcher {
|
||||
};
|
||||
|
||||
// Implements Pointwise(tuple_matcher, rhs_container). tuple_matcher
|
||||
// must be able to be safely cast to Matcher<tuple<const T1&, const
|
||||
// must be able to be safely cast to Matcher<std::tuple<const T1&, const
|
||||
// T2&> >, where T1 and T2 are the types of elements in the LHS
|
||||
// container and the RHS container respectively.
|
||||
template <typename TupleMatcher, typename RhsContainer>
|
||||
@@ -3001,7 +3001,7 @@ class PointwiseMatcher {
|
||||
// reference, as they may be expensive to copy. We must use tuple
|
||||
// instead of pair here, as a pair cannot hold references (C++ 98,
|
||||
// 20.2.2 [lib.pairs]).
|
||||
typedef ::testing::tuple<const LhsValue&, const RhsValue&> InnerMatcherArg;
|
||||
typedef ::std::tuple<const LhsValue&, const RhsValue&> InnerMatcherArg;
|
||||
|
||||
Impl(const TupleMatcher& tuple_matcher, const RhsStlContainer& rhs)
|
||||
// mono_tuple_matcher_ holds a monomorphic version of the tuple matcher.
|
||||
@@ -3800,7 +3800,7 @@ class UnorderedElementsAreMatcher {
|
||||
typedef typename View::value_type Element;
|
||||
typedef ::std::vector<Matcher<const Element&> > MatcherVec;
|
||||
MatcherVec matchers;
|
||||
matchers.reserve(::testing::tuple_size<MatcherTuple>::value);
|
||||
matchers.reserve(::std::tuple_size<MatcherTuple>::value);
|
||||
TransformTupleValues(CastAndAppendTransform<const Element&>(), matchers_,
|
||||
::std::back_inserter(matchers));
|
||||
return MakeMatcher(new UnorderedElementsAreMatcherImpl<Container>(
|
||||
@@ -3822,7 +3822,7 @@ class ElementsAreMatcher {
|
||||
operator Matcher<Container>() const {
|
||||
GTEST_COMPILE_ASSERT_(
|
||||
!IsHashTable<GTEST_REMOVE_REFERENCE_AND_CONST_(Container)>::value ||
|
||||
::testing::tuple_size<MatcherTuple>::value < 2,
|
||||
::std::tuple_size<MatcherTuple>::value < 2,
|
||||
use_UnorderedElementsAre_with_hash_tables);
|
||||
|
||||
typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
|
||||
@@ -3830,7 +3830,7 @@ class ElementsAreMatcher {
|
||||
typedef typename View::value_type Element;
|
||||
typedef ::std::vector<Matcher<const Element&> > MatcherVec;
|
||||
MatcherVec matchers;
|
||||
matchers.reserve(::testing::tuple_size<MatcherTuple>::value);
|
||||
matchers.reserve(::std::tuple_size<MatcherTuple>::value);
|
||||
TransformTupleValues(CastAndAppendTransform<const Element&>(), matchers_,
|
||||
::std::back_inserter(matchers));
|
||||
return MakeMatcher(new ElementsAreMatcherImpl<Container>(
|
||||
@@ -3923,7 +3923,7 @@ class BoundSecondMatcher {
|
||||
template <typename T>
|
||||
class Impl : public MatcherInterface<T> {
|
||||
public:
|
||||
typedef ::testing::tuple<T, Second> ArgTuple;
|
||||
typedef ::std::tuple<T, Second> ArgTuple;
|
||||
|
||||
Impl(const Tuple2Matcher& tm, const Second& second)
|
||||
: mono_tuple2_matcher_(SafeMatcherCast<const ArgTuple&>(tm)),
|
||||
@@ -4043,6 +4043,7 @@ class VariantMatcher {
|
||||
template <typename Variant>
|
||||
bool MatchAndExplain(const Variant& value,
|
||||
::testing::MatchResultListener* listener) const {
|
||||
using std::get;
|
||||
if (!listener->IsInterested()) {
|
||||
return holds_alternative<T>(value) && matcher_.Matches(get<T>(value));
|
||||
}
|
||||
@@ -4817,7 +4818,7 @@ WhenSorted(const ContainerMatcher& container_matcher) {
|
||||
// Matches an STL-style container or a native array that contains the
|
||||
// same number of elements as in rhs, where its i-th element and rhs's
|
||||
// i-th element (as a pair) satisfy the given pair matcher, for all i.
|
||||
// TupleMatcher must be able to be safely cast to Matcher<tuple<const
|
||||
// TupleMatcher must be able to be safely cast to Matcher<std::tuple<const
|
||||
// T1&, const T2&> >, where T1 and T2 are the types of elements in the
|
||||
// LHS container and the RHS container respectively.
|
||||
template <typename TupleMatcher, typename Container>
|
||||
@@ -4848,7 +4849,7 @@ inline internal::PointwiseMatcher<TupleMatcher, std::vector<T> > Pointwise(
|
||||
// elements as in rhs, where in some permutation of the container, its
|
||||
// i-th element and rhs's i-th element (as a pair) satisfy the given
|
||||
// pair matcher, for all i. Tuple2Matcher must be able to be safely
|
||||
// cast to Matcher<tuple<const T1&, const T2&> >, where T1 and T2 are
|
||||
// cast to Matcher<std::tuple<const T1&, const T2&> >, where T1 and T2 are
|
||||
// the types of elements in the LHS container and the RHS container
|
||||
// respectively.
|
||||
//
|
||||
@@ -5140,20 +5141,21 @@ std::string DescribeMatcher(const M& matcher, bool negation = false) {
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
internal::ElementsAreMatcher<tuple<typename std::decay<const Args&>::type...>>
|
||||
internal::ElementsAreMatcher<
|
||||
std::tuple<typename std::decay<const Args&>::type...>>
|
||||
ElementsAre(const Args&... matchers) {
|
||||
return internal::ElementsAreMatcher<
|
||||
tuple<typename std::decay<const Args&>::type...>>(
|
||||
make_tuple(matchers...));
|
||||
std::tuple<typename std::decay<const Args&>::type...>>(
|
||||
std::make_tuple(matchers...));
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
internal::UnorderedElementsAreMatcher<
|
||||
tuple<typename std::decay<const Args&>::type...>>
|
||||
std::tuple<typename std::decay<const Args&>::type...>>
|
||||
UnorderedElementsAre(const Args&... matchers) {
|
||||
return internal::UnorderedElementsAreMatcher<
|
||||
tuple<typename std::decay<const Args&>::type...>>(
|
||||
make_tuple(matchers...));
|
||||
std::tuple<typename std::decay<const Args&>::type...>>(
|
||||
std::make_tuple(matchers...));
|
||||
}
|
||||
|
||||
// Define variadic matcher versions.
|
||||
|
||||
@@ -162,7 +162,7 @@ WithArg(const InnerAction& action) {
|
||||
ACTION_TEMPLATE(ReturnArg,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_0_VALUE_PARAMS()) {
|
||||
return ::testing::get<k>(args);
|
||||
return ::std::get<k>(args);
|
||||
}
|
||||
|
||||
// Action SaveArg<k>(pointer) saves the k-th (0-based) argument of the
|
||||
@@ -170,7 +170,7 @@ ACTION_TEMPLATE(ReturnArg,
|
||||
ACTION_TEMPLATE(SaveArg,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_1_VALUE_PARAMS(pointer)) {
|
||||
*pointer = ::testing::get<k>(args);
|
||||
*pointer = ::std::get<k>(args);
|
||||
}
|
||||
|
||||
// Action SaveArgPointee<k>(pointer) saves the value pointed to
|
||||
@@ -178,7 +178,7 @@ ACTION_TEMPLATE(SaveArg,
|
||||
ACTION_TEMPLATE(SaveArgPointee,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_1_VALUE_PARAMS(pointer)) {
|
||||
*pointer = *::testing::get<k>(args);
|
||||
*pointer = *::std::get<k>(args);
|
||||
}
|
||||
|
||||
// Action SetArgReferee<k>(value) assigns 'value' to the variable
|
||||
@@ -186,13 +186,13 @@ ACTION_TEMPLATE(SaveArgPointee,
|
||||
ACTION_TEMPLATE(SetArgReferee,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_1_VALUE_PARAMS(value)) {
|
||||
typedef typename ::testing::tuple_element<k, args_type>::type argk_type;
|
||||
typedef typename ::std::tuple_element<k, args_type>::type argk_type;
|
||||
// Ensures that argument #k is a reference. If you get a compiler
|
||||
// error on the next line, you are using SetArgReferee<k>(value) in
|
||||
// a mock function whose k-th (0-based) argument is not a reference.
|
||||
GTEST_COMPILE_ASSERT_(internal::is_reference<argk_type>::value,
|
||||
SetArgReferee_must_be_used_with_a_reference_argument);
|
||||
::testing::get<k>(args) = value;
|
||||
::std::get<k>(args) = value;
|
||||
}
|
||||
|
||||
// Action SetArrayArgument<k>(first, last) copies the elements in
|
||||
@@ -205,9 +205,9 @@ ACTION_TEMPLATE(SetArrayArgument,
|
||||
AND_2_VALUE_PARAMS(first, last)) {
|
||||
// Visual Studio deprecates ::std::copy, so we use our own copy in that case.
|
||||
#ifdef _MSC_VER
|
||||
internal::CopyElements(first, last, ::testing::get<k>(args));
|
||||
internal::CopyElements(first, last, ::std::get<k>(args));
|
||||
#else
|
||||
::std::copy(first, last, ::testing::get<k>(args));
|
||||
::std::copy(first, last, ::std::get<k>(args));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ ACTION_TEMPLATE(SetArrayArgument,
|
||||
ACTION_TEMPLATE(DeleteArg,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_0_VALUE_PARAMS()) {
|
||||
delete ::testing::get<k>(args);
|
||||
delete ::std::get<k>(args);
|
||||
}
|
||||
|
||||
// This action returns the value pointed to by 'pointer'.
|
||||
|
||||
@@ -70,79 +70,71 @@ template <typename Tuple>
|
||||
struct MatcherTuple;
|
||||
|
||||
template <>
|
||||
struct MatcherTuple< ::testing::tuple<> > {
|
||||
typedef ::testing::tuple< > type;
|
||||
struct MatcherTuple< ::std::tuple<> > {
|
||||
typedef ::std::tuple< > type;
|
||||
};
|
||||
|
||||
template <typename A1>
|
||||
struct MatcherTuple< ::testing::tuple<A1> > {
|
||||
typedef ::testing::tuple<Matcher<A1> > type;
|
||||
struct MatcherTuple< ::std::tuple<A1> > {
|
||||
typedef ::std::tuple<Matcher<A1> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2>
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2> > type;
|
||||
struct MatcherTuple< ::std::tuple<A1, A2> > {
|
||||
typedef ::std::tuple<Matcher<A1>, Matcher<A2> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3>
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3> > type;
|
||||
struct MatcherTuple< ::std::tuple<A1, A2, A3> > {
|
||||
typedef ::std::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4>
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4> >
|
||||
type;
|
||||
struct MatcherTuple< ::std::tuple<A1, A2, A3, A4> > {
|
||||
typedef ::std::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>,
|
||||
Matcher<A4> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5>
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4, A5> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5> >
|
||||
type;
|
||||
struct MatcherTuple< ::std::tuple<A1, A2, A3, A4, A5> > {
|
||||
typedef ::std::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5,
|
||||
typename A6>
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4, A5, A6> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6> >
|
||||
type;
|
||||
struct MatcherTuple< ::std::tuple<A1, A2, A3, A4, A5, A6> > {
|
||||
typedef ::std::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5,
|
||||
typename A6, typename A7>
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4, A5, A6, A7> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6>, Matcher<A7> >
|
||||
type;
|
||||
struct MatcherTuple< ::std::tuple<A1, A2, A3, A4, A5, A6, A7> > {
|
||||
typedef ::std::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6>, Matcher<A7> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5,
|
||||
typename A6, typename A7, typename A8>
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8> >
|
||||
type;
|
||||
struct MatcherTuple< ::std::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
|
||||
typedef ::std::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5,
|
||||
typename A6, typename A7, typename A8, typename A9>
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8>,
|
||||
Matcher<A9> >
|
||||
type;
|
||||
struct MatcherTuple< ::std::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
|
||||
typedef ::std::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8>, Matcher<A9> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5,
|
||||
typename A6, typename A7, typename A8, typename A9, typename A10>
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
|
||||
A10> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8>,
|
||||
Matcher<A9>, Matcher<A10> >
|
||||
type;
|
||||
struct MatcherTuple< ::std::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10> > {
|
||||
typedef ::std::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8>, Matcher<A9>,
|
||||
Matcher<A10> > type;
|
||||
};
|
||||
|
||||
// Template struct Function<F>, where F must be a function type, contains
|
||||
@@ -164,7 +156,7 @@ struct Function;
|
||||
template <typename R>
|
||||
struct Function<R()> {
|
||||
typedef R Result;
|
||||
typedef ::testing::tuple<> ArgumentTuple;
|
||||
typedef ::std::tuple<> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid();
|
||||
typedef IgnoredValue MakeResultIgnoredValue();
|
||||
@@ -174,7 +166,7 @@ template <typename R, typename A1>
|
||||
struct Function<R(A1)>
|
||||
: Function<R()> {
|
||||
typedef A1 Argument1;
|
||||
typedef ::testing::tuple<A1> ArgumentTuple;
|
||||
typedef ::std::tuple<A1> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1);
|
||||
@@ -184,7 +176,7 @@ template <typename R, typename A1, typename A2>
|
||||
struct Function<R(A1, A2)>
|
||||
: Function<R(A1)> {
|
||||
typedef A2 Argument2;
|
||||
typedef ::testing::tuple<A1, A2> ArgumentTuple;
|
||||
typedef ::std::tuple<A1, A2> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2);
|
||||
@@ -194,7 +186,7 @@ template <typename R, typename A1, typename A2, typename A3>
|
||||
struct Function<R(A1, A2, A3)>
|
||||
: Function<R(A1, A2)> {
|
||||
typedef A3 Argument3;
|
||||
typedef ::testing::tuple<A1, A2, A3> ArgumentTuple;
|
||||
typedef ::std::tuple<A1, A2, A3> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3);
|
||||
@@ -204,7 +196,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4>
|
||||
struct Function<R(A1, A2, A3, A4)>
|
||||
: Function<R(A1, A2, A3)> {
|
||||
typedef A4 Argument4;
|
||||
typedef ::testing::tuple<A1, A2, A3, A4> ArgumentTuple;
|
||||
typedef ::std::tuple<A1, A2, A3, A4> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4);
|
||||
@@ -215,7 +207,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
struct Function<R(A1, A2, A3, A4, A5)>
|
||||
: Function<R(A1, A2, A3, A4)> {
|
||||
typedef A5 Argument5;
|
||||
typedef ::testing::tuple<A1, A2, A3, A4, A5> ArgumentTuple;
|
||||
typedef ::std::tuple<A1, A2, A3, A4, A5> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4, A5);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5);
|
||||
@@ -226,7 +218,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
struct Function<R(A1, A2, A3, A4, A5, A6)>
|
||||
: Function<R(A1, A2, A3, A4, A5)> {
|
||||
typedef A6 Argument6;
|
||||
typedef ::testing::tuple<A1, A2, A3, A4, A5, A6> ArgumentTuple;
|
||||
typedef ::std::tuple<A1, A2, A3, A4, A5, A6> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6);
|
||||
@@ -237,7 +229,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
struct Function<R(A1, A2, A3, A4, A5, A6, A7)>
|
||||
: Function<R(A1, A2, A3, A4, A5, A6)> {
|
||||
typedef A7 Argument7;
|
||||
typedef ::testing::tuple<A1, A2, A3, A4, A5, A6, A7> ArgumentTuple;
|
||||
typedef ::std::tuple<A1, A2, A3, A4, A5, A6, A7> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7);
|
||||
@@ -248,7 +240,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8)>
|
||||
: Function<R(A1, A2, A3, A4, A5, A6, A7)> {
|
||||
typedef A8 Argument8;
|
||||
typedef ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8> ArgumentTuple;
|
||||
typedef ::std::tuple<A1, A2, A3, A4, A5, A6, A7, A8> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8);
|
||||
@@ -259,7 +251,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)>
|
||||
: Function<R(A1, A2, A3, A4, A5, A6, A7, A8)> {
|
||||
typedef A9 Argument9;
|
||||
typedef ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> ArgumentTuple;
|
||||
typedef ::std::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8,
|
||||
@@ -272,8 +264,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)>
|
||||
: Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
|
||||
typedef A10 Argument10;
|
||||
typedef ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
|
||||
A10> ArgumentTuple;
|
||||
typedef ::std::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8,
|
||||
|
||||
@@ -78,8 +78,8 @@ $var typename_As = [[$for j, [[typename A$j]]]]
|
||||
$var As = [[$for j, [[A$j]]]]
|
||||
$var matcher_As = [[$for j, [[Matcher<A$j>]]]]
|
||||
template <$typename_As>
|
||||
struct MatcherTuple< ::testing::tuple<$As> > {
|
||||
typedef ::testing::tuple<$matcher_As > type;
|
||||
struct MatcherTuple< ::std::tuple<$As> > {
|
||||
typedef ::std::tuple<$matcher_As > type;
|
||||
};
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ struct Function;
|
||||
template <typename R>
|
||||
struct Function<R()> {
|
||||
typedef R Result;
|
||||
typedef ::testing::tuple<> ArgumentTuple;
|
||||
typedef ::std::tuple<> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid();
|
||||
typedef IgnoredValue MakeResultIgnoredValue();
|
||||
@@ -122,7 +122,7 @@ template <typename R$typename_As>
|
||||
struct Function<R($As)>
|
||||
: Function<R($prev_As)> {
|
||||
typedef A$i Argument$i;
|
||||
typedef ::testing::tuple<$As> ArgumentTuple;
|
||||
typedef ::std::tuple<$As> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid($As);
|
||||
typedef IgnoredValue MakeResultIgnoredValue($As);
|
||||
|
||||
@@ -493,7 +493,7 @@ class StlContainerView<Element[N]> {
|
||||
// This specialization is used when RawContainer is a native array
|
||||
// represented as a (pointer, size) tuple.
|
||||
template <typename ElementPointer, typename Size>
|
||||
class StlContainerView< ::testing::tuple<ElementPointer, Size> > {
|
||||
class StlContainerView< ::std::tuple<ElementPointer, Size> > {
|
||||
public:
|
||||
typedef GTEST_REMOVE_CONST_(
|
||||
typename internal::PointeeOf<ElementPointer>::type) RawElement;
|
||||
@@ -501,11 +501,12 @@ class StlContainerView< ::testing::tuple<ElementPointer, Size> > {
|
||||
typedef const type const_reference;
|
||||
|
||||
static const_reference ConstReference(
|
||||
const ::testing::tuple<ElementPointer, Size>& array) {
|
||||
return type(get<0>(array), get<1>(array), RelationToSourceReference());
|
||||
const ::std::tuple<ElementPointer, Size>& array) {
|
||||
return type(std::get<0>(array), std::get<1>(array),
|
||||
RelationToSourceReference());
|
||||
}
|
||||
static type Copy(const ::testing::tuple<ElementPointer, Size>& array) {
|
||||
return type(get<0>(array), get<1>(array), RelationToSourceCopy());
|
||||
static type Copy(const ::std::tuple<ElementPointer, Size>& array) {
|
||||
return type(std::get<0>(array), std::get<1>(array), RelationToSourceCopy());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user