Xmipp  v3.23.11-Nereus
Classes | Public Member Functions | List of all members
testing::internal::ReturnRefAction< T > Class Template Reference

#include <gmock-actions.h>

Public Member Functions

 ReturnRefAction (T &ref)
 
template<typename F >
 operator Action< F > () const
 

Detailed Description

template<typename T>
class testing::internal::ReturnRefAction< T >

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

Constructor & Destructor Documentation

◆ ReturnRefAction()

template<typename T >
testing::internal::ReturnRefAction< T >::ReturnRefAction ( T &  ref)
inlineexplicit

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

1145 : ref_(ref) {} // NOLINT

Member Function Documentation

◆ operator Action< F >()

template<typename T >
template<typename F >
testing::internal::ReturnRefAction< T >::operator Action< F > ( ) const
inline

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

1150  {
1151  typedef typename Function<F>::Result Result;
1152  // Asserts that the function return type is a reference. This
1153  // catches the user error of using ReturnRef(x) when Return(x)
1154  // should be used, and generates some helpful error message.
1155  static_assert(std::is_reference<Result>::value,
1156  "use Return instead of ReturnRef to return a value");
1157  return Action<F>(new Impl<F>(ref_));
1158  }

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