NDDEM
Public Types | Static Public Attributes | Private Types | List of all members
cereal::common_detail::is_enum< T > Class Template Reference

Checks if a type is an enum. More...

#include <common.hpp>

Public Types

using type = StrippedT
 
using base_type = typename enum_underlying_type< StrippedT, value >::type
 

Static Public Attributes

static const bool value = std::is_enum<StrippedT>::value
 

Private Types

using DecayedT = typename std::decay< T >::type
 
using StrippedT = typename ::cereal::traits::strip_minimal< DecayedT >::type
 

Detailed Description

template<class T>
class cereal::common_detail::is_enum< T >

Checks if a type is an enum.

This is needed over simply calling std::is_enum because the type traits checking at compile time will attempt to call something like load_minimal with a special NoConvertRef struct that wraps up the true type.

This will strip away any of that and also expose the true underlying type.

Member Typedef Documentation

◆ base_type

template<class T >
using cereal::common_detail::is_enum< T >::base_type = typename enum_underlying_type<StrippedT, value>::type

◆ DecayedT

template<class T >
using cereal::common_detail::is_enum< T >::DecayedT = typename std::decay<T>::type
private

◆ StrippedT

template<class T >
using cereal::common_detail::is_enum< T >::StrippedT = typename ::cereal::traits::strip_minimal<DecayedT>::type
private

◆ type

template<class T >
using cereal::common_detail::is_enum< T >::type = StrippedT

Member Data Documentation

◆ value

template<class T >
const bool cereal::common_detail::is_enum< T >::value = std::is_enum<StrippedT>::value
static

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