diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h index 11223cf2..a7b84d1b 100644 --- a/googlemock/include/gmock/gmock-actions.h +++ b/googlemock/include/gmock/gmock-actions.h @@ -1222,6 +1222,43 @@ class ActionHelper { } }; +// A helper base class needed for implementing the ACTION* macros. +// Implements constructor and conversion operator for Action. +// +// Template specialization for parameterless Action. +template +class ActionImpl { + public: + ActionImpl() = default; + + template + operator ::testing::Action() const { // NOLINT(runtime/explicit) + return ::testing::Action(new typename Derived::template gmock_Impl()); + } +}; + +// Template specialization for parameterized Action. +template