10 template<concepts::IntegralOrEnum T>
12 constexpr auto operator()(T value)
const -> T {
16 if constexpr (
sizeof(T) == 1) {
18 }
else if constexpr (
sizeof(T) == 2) {
19 return __builtin_bswap16(value);
20 }
else if constexpr (
sizeof(T) == 4) {
21 return __builtin_bswap32(value);
22 }
else if constexpr (
sizeof(T) == 8) {
23 return __builtin_bswap64(value);
25#ifdef DI_HAVE_128_BIT_INTEGERS
26 else if constexpr (
sizeof(T) == 16) {
27 return __builtin_bswap128(value);
This concept is used with static_assert() to cause the static assert to fail only when the template h...
Definition core.h:98
Definition language.h:259
Definition language.h:376
Definition bit_proxy_reference.h:5
Definition bit_proxy_reference.h:5
constexpr auto byteswap
Definition byteswap.h:38
constexpr auto to_underlying
Definition to_underlying.h:15
Definition zstring_parser.h:9