xte::is_arithmetic<>

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

Checks that a given type is an integer or floating-point type (excluding bool).


Definition

template<typename T>
concept is_arithmetic = xte::is_int<T> || xte::is_float<T>;



Example

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