Electroneum
testing::internal::ReturnAction< R > Class Template Reference

#include <gmock-actions.h>

Public Member Functions

 ReturnAction (R value)
 
template<typename F >
 operator Action< F > () const
 

Detailed Description

template<typename R>
class testing::internal::ReturnAction< R >

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

Constructor & Destructor Documentation

◆ ReturnAction()

template<typename R >
testing::internal::ReturnAction< R >::ReturnAction ( value)
inlineexplicit

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

539 : value_(new R(internal::move(value))) {}
const T & move(const T &t)
Definition: gtest-port.h:1317
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225

Member Function Documentation

◆ operator Action< F >()

template<typename R >
template<typename F >
testing::internal::ReturnAction< R >::operator Action< F > ( ) const
inline

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

544  {
545  // Assert statement belongs here because this is the best place to verify
546  // conditions on F. It produces the clearest error messages
547  // in most compilers.
548  // Impl really belongs in this scope as a local class but can't
549  // because MSVC produces duplicate symbols in different translation units
550  // in this case. Until MS fixes that bug we put Impl into the class scope
551  // and put the typedef both here (for use in assert statement) and
552  // in the Impl class. But both definitions must be the same.
553  typedef typename Function<F>::Result Result;
556  use_ReturnRef_instead_of_Return_to_return_a_reference);
557  return Action<F>(new Impl<R, F>(value_));
558  }
#define GTEST_COMPILE_ASSERT_(expr, msg)
Definition: gtest-port.h:1032

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