Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::SafeMatcherCastImpl< T > Class Template Reference

#include <gmock-matchers.h>

Static Public Member Functions

template<typename M >
static Matcher< TCast (const M &polymorphic_matcher_or_value)
 
template<typename U >
static Matcher< TCast (const Matcher< U > &matcher)
 

Detailed Description

template<typename T>
class testing::SafeMatcherCastImpl< T >

Definition at line 789 of file gmock-matchers.h.

Member Function Documentation

◆ Cast() [1/2]

template<typename T >
template<typename M >
static Matcher< T > testing::SafeMatcherCastImpl< T >::Cast ( const M & polymorphic_matcher_or_value)
inlinestatic

Definition at line 794 of file gmock-matchers.h.

794 {
795 return internal::MatcherCastImpl<T, M>::Cast(polymorphic_matcher_or_value);
796 }
static Matcher< T > Cast(const M &polymorphic_matcher_or_value)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cast() [2/2]

template<typename T >
template<typename U >
static Matcher< T > testing::SafeMatcherCastImpl< T >::Cast ( const Matcher< U > & matcher)
inlinestatic

Definition at line 808 of file gmock-matchers.h.

808 {
809 // Enforce that T can be implicitly converted to U.
811 T_must_be_implicitly_convertible_to_U);
812 // Enforce that we are not converting a non-reference type T to a reference
813 // type U.
816 cannot_convert_non_reference_arg_to_reference);
817 // In case both T and U are arithmetic types, enforce that the
818 // conversion is not lossy.
821 const bool kTIsOther = GMOCK_KIND_OF_(RawT) == internal::kOther;
822 const bool kUIsOther = GMOCK_KIND_OF_(RawU) == internal::kOther;
824 kTIsOther || kUIsOther ||
825 (internal::LosslessArithmeticConvertible<RawT, RawU>::value),
826 conversion_of_arithmetic_types_must_be_lossless);
827 return MatcherCast<T>(matcher);
828 }
#define GMOCK_KIND_OF_(type)
#define GTEST_REMOVE_REFERENCE_AND_CONST_(T)
#define GTEST_COMPILE_ASSERT_(expr, msg)
Matcher< T > MatcherCast(const M &matcher)
#define T(meth, val, expected)
Definition dtoa.c:306
Here is the call graph for this function:

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