@@ -396,19 +396,19 @@ constexpr auto is_constant_evaluated(bool default_value = false) noexcept
396396#elif defined(__SIZEOF_INT128__) && !defined(__NVCC__) && \
397397 !(FMT_CLANG_VERSION && FMT_MSC_VERSION)
398398# define FMT_USE_INT128 1
399- using int128_opt = __int128_t ; // An optional native 128-bit integer.
400- using uint128_opt = __uint128_t ;
401- inline auto map (int128_opt x) -> int128_opt { return x; }
402- inline auto map (uint128_opt x) -> uint128_opt { return x; }
399+ using native_int128 = __int128_t ;
400+ using native_uint128 = __uint128_t ;
401+ inline auto map (native_int128 x) -> native_int128 { return x; }
402+ inline auto map (native_uint128 x) -> native_uint128 { return x; }
403403#else
404404# define FMT_USE_INT128 0
405405#endif
406406#if !FMT_USE_INT128
407- enum class int128_opt {};
408- enum class uint128_opt {};
407+ enum class native_int128 {}; // A fallback to reduce conditional compilation.
408+ enum class native_uint128 {};
409409// Reduce template instantiations.
410- inline auto map (int128_opt ) -> monostate { return {}; }
411- inline auto map (uint128_opt ) -> monostate { return {}; }
410+ inline auto map (native_int128 ) -> monostate { return {}; }
411+ inline auto map (native_uint128 ) -> monostate { return {}; }
412412#endif
413413
414414// Casts a nonnegative integer to unsigned.
@@ -985,8 +985,8 @@ FMT_TYPE_CONSTANT(int, int_type);
985985FMT_TYPE_CONSTANT (unsigned , uint_type);
986986FMT_TYPE_CONSTANT (long long , long_long_type);
987987FMT_TYPE_CONSTANT (ullong, ulong_long_type);
988- FMT_TYPE_CONSTANT (int128_opt , int128_type);
989- FMT_TYPE_CONSTANT (uint128_opt , uint128_type);
988+ FMT_TYPE_CONSTANT (native_int128 , int128_type);
989+ FMT_TYPE_CONSTANT (native_uint128 , uint128_type);
990990FMT_TYPE_CONSTANT (bool , bool_type);
991991FMT_TYPE_CONSTANT (Char, char_type);
992992FMT_TYPE_CONSTANT (float , float_type);
@@ -1156,8 +1156,8 @@ template <typename Char> struct type_mapper {
11561156 static auto map (unsigned long ) -> ulong_type;
11571157 static auto map (long long ) -> long long;
11581158 static auto map (ullong) -> ullong;
1159- static auto map (int128_opt ) -> int128_opt ;
1160- static auto map (uint128_opt ) -> uint128_opt ;
1159+ static auto map (native_int128 ) -> native_int128 ;
1160+ static auto map (native_uint128 ) -> native_uint128 ;
11611161 static auto map (bool ) -> bool;
11621162
11631163 template <typename T, FMT_ENABLE_IF(is_code_unit<T>::value)>
@@ -2080,8 +2080,8 @@ template <typename Context> class value {
20802080 unsigned uint_value;
20812081 long long long_long_value;
20822082 ullong ulong_long_value;
2083- int128_opt int128_value;
2084- uint128_opt uint128_value;
2083+ native_int128 int128_value;
2084+ native_uint128 uint128_value;
20852085 bool bool_value;
20862086 char_type char_value;
20872087 float float_value;
@@ -2105,8 +2105,8 @@ template <typename Context> class value {
21052105 : value(ulong_type(x)) {}
21062106 constexpr FMT_INLINE value (long long x FMT_BUILTIN) : long_long_value(x) {}
21072107 constexpr FMT_INLINE value (ullong x FMT_BUILTIN) : ulong_long_value(x) {}
2108- FMT_INLINE value (int128_opt x FMT_BUILTIN) : int128_value(x) {}
2109- FMT_INLINE value (uint128_opt x FMT_BUILTIN) : uint128_value(x) {}
2108+ FMT_INLINE value (native_int128 x FMT_BUILTIN) : int128_value(x) {}
2109+ FMT_INLINE value (native_uint128 x FMT_BUILTIN) : uint128_value(x) {}
21102110 constexpr FMT_INLINE value (bool x FMT_BUILTIN) : bool_value(x) {}
21112111
21122112 template <typename T, FMT_ENABLE_IF(is_code_unit<T>::value)>
0 commit comments