tt::has_equivalence< T, typename > Struct Template Reference

Check if type T has operator== defined. More...

#include <HasEquivalence.hpp>

Detailed Description

template<typename T, typename = std::void_t<>>
struct tt::has_equivalence< T, typename >

Check if type T has operator== defined.

Details

Inherits from std::true_type if the type T has operator== defined, otherwise inherits from std::false_type

Usage

For any type T,

using result = tt::has_equivalence<T>;

Returns: std::bool_constant

Semantics: If the type T has operator== defined, then

typename result::type = std::true_type;

otherwise

typename result::type = std::false_type;

Example

"Failed testing type trait has_equivalence");
"Failed testing type trait has_equivalence");
"Failed testing type trait has_equivalence");
static_assert(tt::has_equivalence_v<TestHelpers::C>,
"Failed testing type trait has_equivalence");
See also
has_inequivalence
Template Parameters
Tthe type we want to know if it has operator==

The documentation for this struct was generated from the following file:
std::true_type
tt::has_equivalence_t
typename has_equivalence< T >::type has_equivalence_t
Definition: HasEquivalence.hpp:56
tt::has_equivalence
Check if type T has operator== defined.
Definition: HasEquivalence.hpp:41