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

#include <gmock-actions.h>

Public Member Functions

 ReturnRefOfCopyAction (const T &value)
 
template<typename F >
 operator Action< F > () const
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ ReturnRefOfCopyAction()

template<typename T >
testing::internal::ReturnRefOfCopyAction< T >::ReturnRefOfCopyAction ( const T &  value)
inlineexplicit

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

1187 : value_(value) {} // NOLINT

Member Function Documentation

◆ operator Action< F >()

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

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

1192  {
1193  typedef typename Function<F>::Result Result;
1194  // Asserts that the function return type is a reference. This
1195  // catches the user error of using ReturnRefOfCopy(x) when Return(x)
1196  // should be used, and generates some helpful error message.
1197  static_assert(std::is_reference<Result>::value,
1198  "use Return instead of ReturnRefOfCopy to return a value");
1199  return Action<F>(new Impl<F>(value_));
1200  }

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