6 #ifndef DISMEC_OPAQUE_INT_H
7 #define DISMEC_OPAQUE_INT_H
10 #include <type_traits>
23 template<
class Tag,
class T = std::
int_fast32_t>
26 static_assert(std::is_integral_v<T>,
"T needs to be an integral type");
39 template<
class Tag,
class T>
44 template<
class Tag,
class T>
49 template<
class Tag,
class T>
54 template<
class Tag,
class T>
59 template<
class Tag,
class T>
64 template<
class Tag,
class T>
69 template<
class Tag,
class T>
An integer-like type that represents categorical values.
constexpr opaque_int_type(T v) noexcept
! Explicit constructor from an underlying int.
constexpr T to_index() const
! Explicitly convert to an integer.
Main namespace in which all types, classes, and functions are defined.
constexpr bool operator<=(opaque_int_type< Tag, T > a, opaque_int_type< Tag, T > b)
std::ostream & operator<<(std::ostream &stream, opaque_int_type< Tag, T > a)
constexpr bool operator==(opaque_int_type< Tag, T > a, opaque_int_type< Tag, T > b)
constexpr bool operator>(opaque_int_type< Tag, T > a, opaque_int_type< Tag, T > b)
constexpr bool operator<(opaque_int_type< Tag, T > a, opaque_int_type< Tag, T > b)
constexpr bool operator!=(opaque_int_type< Tag, T > a, opaque_int_type< Tag, T > b)
constexpr bool operator>=(opaque_int_type< Tag, T > a, opaque_int_type< Tag, T > b)