diff options
author | Abseil Team <absl-team@google.com> | 2020-01-07 08:51:16 (GMT) |
---|---|---|
committer | Andy Soffer <asoffer@google.com> | 2020-01-09 23:25:08 (GMT) |
commit | 4b9c1691c4b7f01fbd9d37d86c88cdad298d48e9 (patch) | |
tree | 5722c708d3b9e1d5c0ca8bafbf4c595e3172d68c /googlemock/include/gmock/gmock-generated-actions.h.pump | |
parent | 306f3754a71d6d1ac644681d3544d06744914228 (diff) | |
download | googletest-4b9c1691c4b7f01fbd9d37d86c88cdad298d48e9.zip googletest-4b9c1691c4b7f01fbd9d37d86c88cdad298d48e9.tar.gz googletest-4b9c1691c4b7f01fbd9d37d86c88cdad298d48e9.tar.bz2 |
Googletest export
Use C++11 variadic templates for Invoke in gmock-generated-actions.h.
Replace InvokeArgumentAdl with Invoke that uses C++11 variadic templates.
PiperOrigin-RevId: 288449236
Diffstat (limited to 'googlemock/include/gmock/gmock-generated-actions.h.pump')
-rw-r--r-- | googlemock/include/gmock/gmock-generated-actions.h.pump | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/googlemock/include/gmock/gmock-generated-actions.h.pump b/googlemock/include/gmock/gmock-generated-actions.h.pump index 1121fbd..bd3eadb 100644 --- a/googlemock/include/gmock/gmock-generated-actions.h.pump +++ b/googlemock/include/gmock/gmock-generated-actions.h.pump @@ -506,32 +506,6 @@ namespace testing { // InvokeArgument action from temporary values and have it performed // later. -namespace internal { -namespace invoke_argument { - -// Appears in InvokeArgumentAdl's argument list to help avoid -// accidental calls to user functions of the same name. -struct AdlTag {}; - -// InvokeArgumentAdl - a helper for InvokeArgument. -// The basic overloads are provided here for generic functors. -// Overloads for other custom-callables are provided in the -// internal/custom/gmock-generated-actions.h header. - -$range i 0..n -$for i -[[ -$range j 1..i - -template <typename R, typename F[[$for j [[, typename A$j]]]]> -R InvokeArgumentAdl(AdlTag, F f[[$for j [[, A$j a$j]]]]) { - return f([[$for j, [[a$j]]]]); -} -]] - -} // namespace invoke_argument -} // namespace internal - $range i 0..n $for i [[ $range j 0..i-1 @@ -540,9 +514,8 @@ ACTION_TEMPLATE(InvokeArgument, HAS_1_TEMPLATE_PARAMS(int, k), AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]])) { using internal::invoke_argument::InvokeArgumentAdl; - return InvokeArgumentAdl<return_type>( - internal::invoke_argument::AdlTag(), - ::std::get<k>(args)$for j [[, p$j]]); + return InvokeArgumentAdl(internal::invoke_argument::AdlTag(), + ::std::get<k>(args)$for j[[, p$j]]); } ]] |