Xmipp  v3.23.11-Nereus
Public Types | Public Member Functions | Public Attributes | List of all members
testing::internal::WithArgsAction< InnerAction, I > Struct Template Reference

#include <gmock-actions.h>

Public Types

template<typename R , typename... Args>
using InnerSignature = R(typename std::tuple_element< I, std::tuple< Args... > >::type...)
 

Public Member Functions

template<typename R , typename... Args>
 operator OnceAction< R (Args...)>() &&
 
template<typename R , typename... Args>
 operator Action< R (Args...)>() const
 

Public Attributes

InnerAction inner_action
 

Detailed Description

template<typename InnerAction, size_t... I>
struct testing::internal::WithArgsAction< InnerAction, I >

Definition at line 1408 of file gmock-actions.h.

Member Typedef Documentation

◆ InnerSignature

template<typename InnerAction , size_t... I>
template<typename R , typename... Args>
using testing::internal::WithArgsAction< InnerAction, I >::InnerSignature = R(typename std::tuple_element<I, std::tuple<Args...> >::type...)

Definition at line 1415 of file gmock-actions.h.

Member Function Documentation

◆ operator Action< R()

template<typename InnerAction , size_t... I>
template<typename R , typename... Args>
testing::internal::WithArgsAction< InnerAction, I >::operator Action< R ( Args...  ) const
inline

Definition at line 1463 of file gmock-actions.h.

1463  { // NOLINT
1464  Action<InnerSignature<R, Args...>> converted(inner_action);
1465 
1466  return [converted](Args&&... args) -> R {
1467  return converted.Perform(std::forward_as_tuple(
1468  std::get<I>(std::forward_as_tuple(std::forward<Args>(args)...))...));
1469  };
1470  }
R(typename std::tuple_element< I, std::tuple< Args... > >::type...) InnerSignature

◆ operator OnceAction< R()

template<typename InnerAction , size_t... I>
template<typename R , typename... Args>
testing::internal::WithArgsAction< InnerAction, I >::operator OnceAction< R ( Args...  ) &&
inline

Definition at line 1436 of file gmock-actions.h.

1436  { // NOLINT
1437  struct OA {
1438  OnceAction<InnerSignature<R, Args...>> inner_action;
1439 
1440  R operator()(Args&&... args) && {
1441  return std::move(inner_action)
1442  .Call(std::get<I>(
1443  std::forward_as_tuple(std::forward<Args>(args)...))...);
1444  }
1445  };
1446 
1447  return OA{std::move(inner_action)};
1448  }
R(typename std::tuple_element< I, std::tuple< Args... > >::type...) InnerSignature

Member Data Documentation

◆ inner_action

template<typename InnerAction , size_t... I>
InnerAction testing::internal::WithArgsAction< InnerAction, I >::inner_action

Definition at line 1409 of file gmock-actions.h.


The documentation for this struct was generated from the following file: