130 #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
131 #define GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
138 #include <functional>
142 #include <type_traits>
150 # pragma warning(push)
151 # pragma warning(disable:4100)
172 template <
typename T,
bool kDefaultConstructible>
176 template <
typename T>
179 Assert(
false, __FILE__, __LINE__,
180 "Default action undefined for the function return type.");
181 return internal::Invalid<T>();
194 template <
typename T>
211 template <
typename T>
220 template <
typename T>
224 static T*
Get() {
return nullptr; }
229 #define GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(type, value) \
231 class BuiltInDefaultValue<type> { \
233 static bool Exists() { return true; } \
234 static type Get() { return value; } \
250 #if GMOCK_WCHAR_T_IS_NATIVE_
265 #undef GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
268 template <
typename P,
typename Q>
269 using disjunction = typename ::std::conditional<P::value, P, Q>::type;
286 template <
typename T>
361 template <
typename T>
370 static void Clear() { address_ =
nullptr; }
373 static bool IsSet() {
return address_ !=
nullptr; }
403 template <
typename T>
404 typename DefaultValue<T>::ValueProducer* DefaultValue<T>::producer_ =
nullptr;
407 template <
typename T>
411 template <
typename F>
437 template <
typename F>
443 ::std::shared_ptr<ActionInterface<F>>
impl_;
445 template <
typename... Args>
447 return impl_->Perform(
448 ::std::forward_as_tuple(::std::forward<Args>(args)...));
463 template <
typename G,
464 typename IsCompatibleFunctor =
465 ::std::is_constructible<::std::function<F>, G>,
466 typename IsNoArgsFunctor =
467 ::std::is_constructible<::std::function<Result()>, G>,
469 IsCompatibleFunctor, IsNoArgsFunctor>
::value>::type>
471 Init(::std::forward<G>(fun), IsCompatibleFunctor());
476 :
fun_(ActionAdapter{::std::shared_ptr<ActionInterface<F>>(impl)}) {}
481 template <
typename Func>
501 template <
typename G>
504 template <
typename G>
505 void Init(G&& g, ::std::true_type) {
506 fun_ = ::std::forward<G>(
g);
509 template <
typename G>
510 void Init(G&& g, ::std::false_type) {
511 fun_ = IgnoreArgs<typename ::std::decay<G>::type>{::std::forward<G>(
g)};
514 template <
typename FunctionImpl>
516 template <
typename... Args>
549 template <
typename Impl>
554 template <
typename F>
560 template <
typename F>
569 return impl_.template Perform<Result>(args);
581 template <
typename F>
593 template <
typename Impl>
602 template <
typename T>
635 template <
typename R>
645 template <
typename F>
658 use_ReturnRef_instead_of_Return_to_return_a_reference);
660 "Can't use Return() on an action expected to return `void`.");
666 template <
typename R_,
typename F>
680 : value_before_cast_(*value),
687 Result_cannot_be_a_reference_type);
698 template <
typename R_,
typename F>
704 explicit Impl(
const std::shared_ptr<R>& wrapper)
705 : performed_(
false), wrapper_(wrapper) {}
709 <<
"A ByMove() action should only be performed once.";
711 return std::move(wrapper_->payload);
728 template <
typename Result,
typename ArgumentTuple>
738 template <
typename Result,
typename ArgumentTuple>
747 template <
typename T>
755 template <
typename F>
762 use_Return_instead_of_ReturnRef_to_return_a_value);
768 template <
typename F>
774 explicit Impl(
T& ref) : ref_(ref) {}
788 template <
typename T>
797 template <
typename F>
805 use_Return_instead_of_ReturnRefOfCopy_to_return_a_value);
811 template <
typename F>
830 template <
typename T>
835 <<
"ReturnRoundRobin requires at least one element.";
836 state_->values = std::move(values);
839 template <
typename... Args>
841 return state_->Next();
847 T ret_val = values[
i++];
848 if (
i == values.size())
i = 0;
855 std::shared_ptr<State> state_ = std::make_shared<State>();
863 template <
typename F>
869 template <
typename T1,
typename T2>
874 template <
typename Result,
typename ArgumentTuple>
884 #if !GTEST_OS_WINDOWS_MOBILE
888 template <
typename T>
892 : errno_(errno_value),
894 template <
typename Result,
typename ArgumentTuple>
905 #endif // !GTEST_OS_WINDOWS_MOBILE
909 template <
size_t N,
typename A,
typename =
void>
913 template <
typename... Args>
915 *::std::get<N>(std::tie(args...)) =
value;
920 template <
class Class,
typename MethodPtr>
925 template <
typename... Args>
927 -> decltype((obj_ptr->*method_ptr)(std::forward<Args>(args)...)) {
928 return (obj_ptr->*method_ptr)(std::forward<Args>(args)...);
936 template <
typename FunctionImpl>
942 template <
typename... Args>
943 auto operator()(
const Args&...) -> decltype(function_impl()) {
944 return function_impl();
949 template <
class Class,
typename MethodPtr>
955 decltype((std::declval<Class*>()->*std::declval<MethodPtr>())());
957 template <
typename... Args>
959 return (obj_ptr->*method_ptr)();
964 template <
typename A>
969 template <
typename F>
988 template <
typename F>
994 explicit Impl(
const A& action) : action_(action) {}
998 action_.Perform(args);
1013 template <
typename InnerAction,
size_t... I>
1019 template <
typename R,
typename... Args>
1021 using TupleType = std::tuple<Args...>;
1025 return [converted](Args... args) ->
R {
1026 return converted.Perform(std::forward_as_tuple(
1027 std::get<I>(std::forward_as_tuple(std::forward<Args>(args)...))...));
1032 template <
typename... Actions>
1035 template <
typename... Args,
size_t... I>
1037 return {std::get<I>(actions)...};
1043 template <
typename R,
typename... Args>
1046 std::vector<
Action<
void(Args...)>> converted;
1048 R operator()(Args... args)
const {
1049 auto tuple_args = std::forward_as_tuple(std::forward<Args>(args)...);
1050 for (
auto&
a : converted) {
1051 a.Perform(tuple_args);
1053 return last.Perform(tuple_args);
1057 std::get<
sizeof...(Actions) - 1>(actions)};
1097 template <
typename...
Action>
1100 return {std::forward_as_tuple(std::forward<Action>(action)...)};
1108 template <
size_t k,
typename InnerAction>
1109 internal::WithArgsAction<typename std::decay<InnerAction>::type, k>
1111 return {std::forward<InnerAction>(action)};
1118 template <
size_t k,
size_t... ks,
typename InnerAction>
1121 return {std::forward<InnerAction>(action)};
1128 template <
typename InnerAction>
1129 internal::WithArgsAction<typename std::decay<InnerAction>::type>
1131 return {std::forward<InnerAction>(action)};
1137 template <
typename R>
1153 template <
typename R>
1159 template <
typename R, R* =
nullptr>
1160 internal::ReturnRefAction<R>
ReturnRef(
R&&) =
delete;
1165 template <
typename R>
1174 template <
typename R>
1182 template <
typename T>
1190 template <
typename T>
1192 std::initializer_list<T> vals) {
1203 template <
size_t N,
typename T>
1205 return {std::move(value)};
1209 template <
size_t N,
typename T>
1211 return {std::move(value)};
1215 template <
typename T1,
typename T2>
1220 #if !GTEST_OS_WINDOWS_MOBILE
1223 template <
typename T>
1224 PolymorphicAction<internal::SetErrnoAndReturnAction<T> >
1230 #endif // !GTEST_OS_WINDOWS_MOBILE
1238 template <
typename FunctionImpl>
1239 typename std::decay<FunctionImpl>::type
Invoke(FunctionImpl&& function_impl) {
1240 return std::forward<FunctionImpl>(function_impl);
1245 template <
class Class,
typename MethodPtr>
1247 MethodPtr method_ptr) {
1248 return {obj_ptr, method_ptr};
1252 template <
typename FunctionImpl>
1253 internal::InvokeWithoutArgsAction<typename std::decay<FunctionImpl>::type>
1255 return {std::move(function_impl)};
1260 template <
class Class,
typename MethodPtr>
1262 Class* obj_ptr, MethodPtr method_ptr) {
1263 return {obj_ptr, method_ptr};
1269 template <
typename A>
1284 template <
typename T>
1285 inline ::std::reference_wrapper<T>
ByRef(
T& l_value) {
1286 return ::std::reference_wrapper<T>(l_value);
1289 namespace internal {
1291 template <
typename T,
typename... Params>
1295 [](
const Params&... unpacked_params) {
1296 return new T(unpacked_params...);
1308 template <
typename T,
typename... Params>
1310 Params&&... params) {
1311 return {std::forward_as_tuple(std::forward<Params>(params)...)};
1314 namespace internal {
1333 template <
typename Result,
class Impl>
1336 template <
typename... Ts>
1338 static constexpr
size_t kMaxArgs =
sizeof...(Ts) <= 10 ?
sizeof...(Ts) : 10;
1344 template <
typename... Ts, std::size_t... tuple_ids, std::size_t... rest_ids>
1347 return impl->template gmock_PerformImpl<
1348 typename std::tuple_element<tuple_ids, std::tuple<Ts...>>::type...>(
1349 args, std::get<tuple_ids>(args)...,
1358 template <
typename Derived>
1363 template <
typename F>
1364 operator ::testing::Action<F>()
const {
1365 return ::testing::Action<F>(
new typename Derived::template gmock_Impl<F>());
1370 template <
template <
typename...>
class Derived,
typename... Ts>
1373 explicit ActionImpl(Ts... params) : params_(std::forward<Ts>(params)...) {}
1375 template <
typename F>
1376 operator ::testing::Action<F>()
const {
1381 template <
typename F, std::size_t... tuple_ids>
1383 return ::testing::Action<F>(
new
1384 typename Derived<Ts...>::template gmock_Impl<F>(
1385 std::get<tuple_ids>(params_)...));
1391 namespace invoke_argument {
1401 template <
typename F,
typename... Args>
1408 #define GMOCK_INTERNAL_ARG_UNUSED(i, data, el) \
1409 , const arg##i##_type& arg##i GTEST_ATTRIBUTE_UNUSED_
1410 #define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_ \
1411 const args_type& args GTEST_ATTRIBUTE_UNUSED_ GMOCK_PP_REPEAT( \
1412 GMOCK_INTERNAL_ARG_UNUSED, , 10)
1414 #define GMOCK_INTERNAL_ARG(i, data, el) , const arg##i##_type& arg##i
1415 #define GMOCK_ACTION_ARG_TYPES_AND_NAMES_ \
1416 const args_type& args GMOCK_PP_REPEAT(GMOCK_INTERNAL_ARG, , 10)
1418 #define GMOCK_INTERNAL_TEMPLATE_ARG(i, data, el) , typename arg##i##_type
1419 #define GMOCK_ACTION_TEMPLATE_ARGS_NAMES_ \
1420 GMOCK_PP_TAIL(GMOCK_PP_REPEAT(GMOCK_INTERNAL_TEMPLATE_ARG, , 10))
1422 #define GMOCK_INTERNAL_TYPENAME_PARAM(i, data, param) , typename param##_type
1423 #define GMOCK_ACTION_TYPENAME_PARAMS_(params) \
1424 GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_TYPENAME_PARAM, , params))
1426 #define GMOCK_INTERNAL_TYPE_PARAM(i, data, param) , param##_type
1427 #define GMOCK_ACTION_TYPE_PARAMS_(params) \
1428 GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_TYPE_PARAM, , params))
1430 #define GMOCK_INTERNAL_TYPE_GVALUE_PARAM(i, data, param) \
1431 , param##_type gmock_p##i
1432 #define GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params) \
1433 GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_TYPE_GVALUE_PARAM, , params))
1435 #define GMOCK_INTERNAL_GVALUE_PARAM(i, data, param) \
1436 , std::forward<param##_type>(gmock_p##i)
1437 #define GMOCK_ACTION_GVALUE_PARAMS_(params) \
1438 GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_GVALUE_PARAM, , params))
1440 #define GMOCK_INTERNAL_INIT_PARAM(i, data, param) \
1441 , param(::std::forward<param##_type>(gmock_p##i))
1442 #define GMOCK_ACTION_INIT_PARAMS_(params) \
1443 GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_INIT_PARAM, , params))
1445 #define GMOCK_INTERNAL_FIELD_PARAM(i, data, param) param##_type param;
1446 #define GMOCK_ACTION_FIELD_PARAMS_(params) \
1447 GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_FIELD_PARAM, , params)
1449 #define GMOCK_INTERNAL_ACTION(name, full_name, params) \
1450 template <GMOCK_ACTION_TYPENAME_PARAMS_(params)> \
1451 class full_name : public ::testing::internal::ActionImpl< \
1452 full_name<GMOCK_ACTION_TYPE_PARAMS_(params)>> { \
1453 using base_type = ::testing::internal::ActionImpl<full_name>; \
1456 using base_type::base_type; \
1457 template <typename F> \
1458 class gmock_Impl : public ::testing::ActionInterface<F> { \
1460 typedef F function_type; \
1461 typedef typename ::testing::internal::Function<F>::Result return_type; \
1463 typename ::testing::internal::Function<F>::ArgumentTuple args_type; \
1464 explicit gmock_Impl(GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params)) \
1465 : GMOCK_ACTION_INIT_PARAMS_(params) {} \
1466 return_type Perform(const args_type& args) override { \
1467 return ::testing::internal::ActionHelper<return_type, \
1468 gmock_Impl>::Perform(this, \
1471 template <GMOCK_ACTION_TEMPLATE_ARGS_NAMES_> \
1472 return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const; \
1473 GMOCK_ACTION_FIELD_PARAMS_(params) \
1476 template <GMOCK_ACTION_TYPENAME_PARAMS_(params)> \
1477 inline full_name<GMOCK_ACTION_TYPE_PARAMS_(params)> name( \
1478 GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params)) { \
1479 return full_name<GMOCK_ACTION_TYPE_PARAMS_(params)>( \
1480 GMOCK_ACTION_GVALUE_PARAMS_(params)); \
1482 template <GMOCK_ACTION_TYPENAME_PARAMS_(params)> \
1483 template <typename F> \
1484 template <GMOCK_ACTION_TEMPLATE_ARGS_NAMES_> \
1485 typename ::testing::internal::Function<F>::Result \
1486 full_name<GMOCK_ACTION_TYPE_PARAMS_(params)>::gmock_Impl< \
1487 F>::gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) \
1492 #define ACTION(name) \
1493 class name##Action : public ::testing::internal::ActionImpl<name##Action> { \
1494 using base_type = ::testing::internal::ActionImpl<name##Action>; \
1497 using base_type::base_type; \
1498 template <typename F> \
1499 class gmock_Impl : public ::testing::ActionInterface<F> { \
1501 typedef F function_type; \
1502 typedef typename ::testing::internal::Function<F>::Result return_type; \
1504 typename ::testing::internal::Function<F>::ArgumentTuple args_type; \
1506 return_type Perform(const args_type& args) override { \
1507 return ::testing::internal::ActionHelper<return_type, \
1508 gmock_Impl>::Perform(this, \
1511 template <GMOCK_ACTION_TEMPLATE_ARGS_NAMES_> \
1512 return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const; \
1515 inline name##Action name() { return name##Action(); } \
1516 template <typename F> \
1517 template <GMOCK_ACTION_TEMPLATE_ARGS_NAMES_> \
1518 typename ::testing::internal::Function<F>::Result \
1519 name##Action::gmock_Impl<F>::gmock_PerformImpl( \
1520 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
1522 #define ACTION_P(name, ...) \
1523 GMOCK_INTERNAL_ACTION(name, name##ActionP, (__VA_ARGS__))
1525 #define ACTION_P2(name, ...) \
1526 GMOCK_INTERNAL_ACTION(name, name##ActionP2, (__VA_ARGS__))
1528 #define ACTION_P3(name, ...) \
1529 GMOCK_INTERNAL_ACTION(name, name##ActionP3, (__VA_ARGS__))
1531 #define ACTION_P4(name, ...) \
1532 GMOCK_INTERNAL_ACTION(name, name##ActionP4, (__VA_ARGS__))
1534 #define ACTION_P5(name, ...) \
1535 GMOCK_INTERNAL_ACTION(name, name##ActionP5, (__VA_ARGS__))
1537 #define ACTION_P6(name, ...) \
1538 GMOCK_INTERNAL_ACTION(name, name##ActionP6, (__VA_ARGS__))
1540 #define ACTION_P7(name, ...) \
1541 GMOCK_INTERNAL_ACTION(name, name##ActionP7, (__VA_ARGS__))
1543 #define ACTION_P8(name, ...) \
1544 GMOCK_INTERNAL_ACTION(name, name##ActionP8, (__VA_ARGS__))
1546 #define ACTION_P9(name, ...) \
1547 GMOCK_INTERNAL_ACTION(name, name##ActionP9, (__VA_ARGS__))
1549 #define ACTION_P10(name, ...) \
1550 GMOCK_INTERNAL_ACTION(name, name##ActionP10, (__VA_ARGS__))
1555 # pragma warning(pop)
1559 #endif // GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
Sacado::Fad::DFad< double > F
internal::Function< F >::Result Result
static Result Perform(const ArgumentTuple &)
PolymorphicAction< internal::ReturnNullAction > ReturnNull()
internal::Function< F >::ArgumentTuple ArgumentTuple
internal::IgnoredValue Unused
GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionInterface)
void Init(G &&g,::std::true_type)
internal::ReturnRoundRobinAction< T > ReturnRoundRobin(std::vector< T > vals)
GTEST_API_ void IllegalDoDefault(const char *file, int line)
static void SetFactory(FactoryFunction factory)
PolymorphicAction< internal::AssignAction< T1, T2 > > Assign(T1 *ptr, T2 val)
const MethodPtr method_ptr
auto Apply(F &&f, Tuple &&args) -> decltype(ApplyImpl(std::forward< F >(f), std::forward< Tuple >(args), MakeIndexSequence< std::tuple_size< typename std::remove_reference< Tuple >::type >::value >()))
static Result Apply(Impl *impl, const std::tuple< Ts...> &args, IndexSequence< tuple_ids...>, IndexSequence< rest_ids...>)
::std::shared_ptr< ActionInterface< F > > impl_
AssignAction(T1 *ptr, T2 value)
Action(const Action< Func > &action)
Function< F >::Result Result
PolymorphicAction(const Impl &impl)
internal::DoAllAction< typename std::decay< Action >::type...> DoAll(Action &&...action)
IgnoreResultAction(const A &action)
Impl(const std::shared_ptr< R > &value)
ReturnType operator()(const Args &...) const
std::tuple< Actions...> actions
GTEST_DISALLOW_COPY_AND_ASSIGN_(FactoryValueProducer)
internal::InvokeWithoutArgsAction< typename std::decay< FunctionImpl >::type > InvokeWithoutArgs(FunctionImpl function_impl)
auto operator()(Args &&...args) const -> decltype((obj_ptr-> *method_ptr)(std::forward< Args >(args)...))
internal::WithArgsAction< typename std::decay< InnerAction >::type, k, ks...> WithArgs(InnerAction &&action)
Function< F >::ArgumentTuple ArgumentTuple
static void Perform(const ArgumentTuple &)
static Result Perform(Impl *impl, const std::tuple< Ts...> &args)
Function< F >::Result Result
PolymorphicAction< Impl > MakePolymorphicAction(const Impl &impl)
FixedValueProducer(T value)
Function< F >::ArgumentTuple ArgumentTuple
Sacado::Rad::ADvar< double > R
Result Perform(const ArgumentTuple &) override
internal::Function< F >::MakeResultIgnoredValue OriginalFunction
inline::std::reference_wrapper< T > ByRef(T &l_value)
PolymorphicAction< internal::SetErrnoAndReturnAction< T > > SetErrnoAndReturn(int errval, T result)
internal::Function< F >::ArgumentTuple ArgumentTuple
auto InvokeArgumentAdl(AdlTag, F f, Args...args) -> decltype(f(args...))
internal::ReturnRefAction< R > ReturnRef(R &x)
std::decay< FunctionImpl >::type Invoke(FunctionImpl &&function_impl)
void operator()(const Args &...args) const
T operator()(Args &&...) const
Result Perform(const ArgumentTuple &) override
const MethodPtr method_ptr
Action(ActionInterface< F > *impl)
#define GTEST_COMPILE_ASSERT_(expr, msg)
virtual ~ActionInterface()
std::tuple< Params...> params
#define GTEST_CHECK_(condition)
FactoryValueProducer(FactoryFunction factory)
GTEST_DISALLOW_COPY_AND_ASSIGN_(FixedValueProducer)
Function< F >::ArgumentTuple ArgumentTuple
const std::shared_ptr< R > wrapper_
Function< F >::Result Result
internal::WithArgsAction< typename std::decay< InnerAction >::type > WithoutArgs(InnerAction &&action)
internal::ReturnRefOfCopyAction< R > ReturnRefOfCopy(const R &x)
internal::Function< F >::Result operator()(Args &&...args)
SetErrnoAndReturnAction(int errno_value, T result)
FunctionImpl function_impl
Result Perform(const ArgumentTuple &) override
internal::Function< F >::Result Result
ReturnRefOfCopyAction(const T &value)
Impl(const std::shared_ptr< R > &wrapper)
internal::Function< F >::ArgumentTuple ArgumentTuple
FunctionImpl function_impl
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void,)
internal::SetArgumentPointeeAction< N, T > SetArgPointee(T value)
std::vector< Action< void(Args...)> > Convert(IndexSequence< I...>) const
internal::Function< F >::Result Result
ReturnRoundRobinAction(std::vector< T > values)
internal::Function< F >::ArgumentTuple ArgumentTuple
Result Perform(const ArgumentTuple &) override
auto operator()(const Args &...) -> decltype(function_impl())
internal::DoDefaultAction DoDefault()
internal::ReturnAction< R > Return(R value)
::testing::Action< F > Apply(IndexSequence< tuple_ids...>) const
Function< F >::Result Result
Function< F >::ArgumentTuple ArgumentTuple
std::tuple< Ts...> params_
void Assert(bool condition, const char *file, int line, const std::string &msg)
const Action< OriginalFunction > action_
MonomorphicImpl(const Impl &impl)
Result Perform(const ArgumentTuple &) const
internal::SetArgumentPointeeAction< N, T > SetArgumentPointee(T value)
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
internal::ByMoveWrapper< R > ByMove(R x)
virtual Result Perform(const ArgumentTuple &args)=0
internal::WithArgsAction< typename std::decay< InnerAction >::type, k > WithArg(InnerAction &&action)
::std::function< F > fun_
Result Perform(const ArgumentTuple &args) override
static ValueProducer * producer_
internal::Function< F >::Result Result
internal::ReturnNewAction< T, typename std::decay< Params >::type...> ReturnNew(Params &&...params)
void Perform(const ArgumentTuple &args) override
void Perform(const ArgumentTuple &) const
const std::shared_ptr< R > value_
internal::IgnoreResultAction< A > IgnoreResult(const A &an_action)
Result operator()(const Args &...) const
const FactoryFunction factory_
void Init(G &&g,::std::false_type)
Result Perform(ArgumentTuple args) const
decltype((std::declval< Class * >() -> *std::declval< MethodPtr >())()) ReturnType
Action< F > MakeAction(ActionInterface< F > *impl)
typename::std::conditional< P::value, P, Q >::type disjunction