Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
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 563 of file gmock-actions.h.

Constructor & Destructor Documentation

◆ ReturnAction()

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

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

568: value_(new R(internal::move(value))) {}
const T & move(const T &t)
#define value
Definition pkcs11.h:157
#define R

Member Function Documentation

◆ operator Action< F >()

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

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

573 {
574 // Assert statement belongs here because this is the best place to verify
575 // conditions on F. It produces the clearest error messages
576 // in most compilers.
577 // Impl really belongs in this scope as a local class but can't
578 // because MSVC produces duplicate symbols in different translation units
579 // in this case. Until MS fixes that bug we put Impl into the class scope
580 // and put the typedef both here (for use in assert statement) and
581 // in the Impl class. But both definitions must be the same.
582 typedef typename Function<F>::Result Result;
585 use_ReturnRef_instead_of_Return_to_return_a_reference);
586 return Action<F>(new Impl<R, F>(value_));
587 }
#define GTEST_COMPILE_ASSERT_(expr, msg)

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