All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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,
<util::always_true_type<typename Cont::value_type>::value>
<blockquote>
</blockquote>
{
using type = typename Cont::reference;
};

Definition at line 145 of file MetaUtils.h.


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