WPILibC++ 2024.3.2
wpi::is_integral_or_enum< T > Class Template Reference

Metafunction that determines whether the given type is either an integral type or an enumeration type, including enum classes. More...

#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/llvm/include/wpi/type_traits.h>

Static Public Attributes

static const bool value
 

Detailed Description

template<typename T>
class wpi::is_integral_or_enum< T >

Metafunction that determines whether the given type is either an integral type or an enumeration type, including enum classes.

Note that this accepts potentially more integral types than is_integral because it is based on being implicitly convertible to an integral type. Also note that enum classes aren't implicitly convertible to integral types, the value may therefore need to be explicitly converted before being used.

Member Data Documentation

◆ value

template<typename T >
const bool wpi::is_integral_or_enum< T >::value
static
Initial value:
=
!std::is_class_v<UnderlyingT> &&
!std::is_pointer_v<UnderlyingT> &&
!std::is_floating_point_v<UnderlyingT> &&
(std::is_enum_v<UnderlyingT> ||
std::is_convertible_v<UnderlyingT, unsigned long long>)

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