From 216c37f057ae0fff38062984c890df912f40ccf6 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 7 Jan 2019 17:06:16 -0500 Subject: Googletest export Drop generated file gmock-generated-internal-utils.h. PiperOrigin-RevId: 228232195 --- .../include/gmock/internal/gmock-internal-utils.h | 36 +++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'googlemock/include/gmock/internal/gmock-internal-utils.h') diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index 7ebd645e..661c8357 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -42,11 +42,14 @@ #include #include // NOLINT #include -#include "gmock/internal/gmock-generated-internal-utils.h" #include "gmock/internal/gmock-port.h" #include "gtest/gtest.h" namespace testing { + +template +class Matcher; + namespace internal { // Silence MSVC C4100 (unreferenced formal parameter) and @@ -525,6 +528,37 @@ auto Apply(F&& f, Tuple&& args) make_int_pack::value>()); } +// Template struct Function, where F must be a function type, contains +// the following typedefs: +// +// Result: the function's return type. +// Arg: the type of the N-th argument, where N starts with 0. +// ArgumentTuple: the tuple type consisting of all parameters of F. +// ArgumentMatcherTuple: the tuple type consisting of Matchers for all +// parameters of F. +// MakeResultVoid: the function type obtained by substituting void +// for the return type of F. +// MakeResultIgnoredValue: +// the function type obtained by substituting Something +// for the return type of F. +template +struct Function; + +template +struct Function { + using Result = R; + static constexpr size_t ArgumentCount = sizeof...(Args); + template + using Arg = ElemFromList::type, + Args...>; + using ArgumentTuple = std::tuple; + using ArgumentMatcherTuple = std::tuple...>; + using MakeResultVoid = void(Args...); + using MakeResultIgnoredValue = IgnoredValue(Args...); +}; + +template +constexpr size_t Function::ArgumentCount; #ifdef _MSC_VER # pragma warning(pop) -- cgit v1.2.3