util::always_true_type< typename > Struct Template Reference

A std::true_type with a template argument. More...

#include <MetaUtils.h>

Inheritance diagram for util::always_true_type< typename >:

Detailed Description

template<typename>
struct util::always_true_type< typename >

A std::true_type with a template argument.

See also
util::always_false_type, util::always_true_v

This is one way to allow to specialize for classes with a certain type:

template <typename T, typename = void>
class ReferenceTypeExtractor {
static_assert(util::always_false_type<T>(), "Type has no reference!");
};
template <typename Cont>
struct ReferenceTypeExtractor<
Cont,
std::enable_if_t
<util::always_true_type<typename Cont::value_type>::value>
>
{
using type = typename Cont::reference;
};

Definition at line 145 of file MetaUtils.h.


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