xte::is_arithmetic_or_bool<>

Defined in header <xte/trait/is_arithmetic_or_bool.hpp>

Checks that a given type is an integer, floating-point, or boolean type.


Definition

template<typename T>
concept is_arithmetic_or_bool = xte::is_arithmetic<T> || xte::is_same_drop_cv<T, bool>;



Example

static_assert(xte::is_arithmetic_or_bool<int>);
static_assert(xte::is_arithmetic_or_bool<float>);
static_assert(xte::is_arithmetic_or_bool<bool>);
[View in Compiler Explorer]