Agora
1.2.0
Agora project
|
Go to the documentation of this file.
41 #include <system_error>
44 #ifdef __cpp_lib_bit_cast
51 # define FMT_GCC_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
53 # define FMT_GCC_VISIBILITY_HIDDEN
57 # define FMT_CUDA_VERSION (__CUDACC_VER_MAJOR__ * 100 + __CUDACC_VER_MINOR__)
59 # define FMT_CUDA_VERSION 0
63 # define FMT_HAS_BUILTIN(x) __has_builtin(x)
65 # define FMT_HAS_BUILTIN(x) 0
68 #if FMT_GCC_VERSION || FMT_CLANG_VERSION
69 # define FMT_NOINLINE __attribute__((noinline))
75 # define FMT_MSC_DEFAULT = default
77 # define FMT_MSC_DEFAULT
82 # if FMT_MSC_VER || FMT_NVCC
85 template <
typename Exception>
inline void do_throw(
const Exception&
x) {
88 volatile bool b =
true;
93 # define FMT_THROW(x) detail::do_throw(x)
95 # define FMT_THROW(x) throw x
98 # define FMT_THROW(x) \
100 FMT_ASSERT(false, (x).what()); \
107 # define FMT_CATCH(x) catch (x)
109 # define FMT_TRY if (true)
110 # define FMT_CATCH(x) if (false)
113 #ifndef FMT_MAYBE_UNUSED
114 # if FMT_HAS_CPP17_ATTRIBUTE(maybe_unused)
115 # define FMT_MAYBE_UNUSED [[maybe_unused]]
117 # define FMT_MAYBE_UNUSED
122 #if FMT_ICC_VERSION || defined(__PGI) || FMT_NVCC
123 # define FMT_DEPRECATED_ALIAS
125 # define FMT_DEPRECATED_ALIAS FMT_DEPRECATED
128 #ifndef FMT_USE_USER_DEFINED_LITERALS
130 # if (FMT_HAS_FEATURE(cxx_user_literals) || FMT_GCC_VERSION >= 407 || \
131 FMT_MSC_VER >= 1900) && \
132 (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 480)
133 # define FMT_USE_USER_DEFINED_LITERALS 1
135 # define FMT_USE_USER_DEFINED_LITERALS 0
143 #if !defined(FMT_REDUCE_INT_INSTANTIATIONS)
144 # define FMT_REDUCE_INT_INSTANTIATIONS 0
150 # if FMT_HAS_BUILTIN(__builtin_clz) || FMT_GCC_VERSION || FMT_ICC_VERSION
151 # define FMT_BUILTIN_CLZ(n) __builtin_clz(n)
153 # if FMT_HAS_BUILTIN(__builtin_clzll) || FMT_GCC_VERSION || FMT_ICC_VERSION
154 # define FMT_BUILTIN_CLZLL(n) __builtin_clzll(n)
161 # if FMT_HAS_BUILTIN(__builtin_ctz) || FMT_GCC_VERSION || FMT_ICC_VERSION
162 # define FMT_BUILTIN_CTZ(n) __builtin_ctz(n)
164 # if FMT_HAS_BUILTIN(__builtin_ctzll) || FMT_GCC_VERSION || FMT_ICC_VERSION
165 # define FMT_BUILTIN_CTZLL(n) __builtin_ctzll(n)
176 #if FMT_MSC_VER && !defined(FMT_BUILTIN_CLZLL) && !defined(FMT_BUILTIN_CTZLL)
180 # if !defined(__clang__)
181 # pragma intrinsic(_BitScanForward)
182 # pragma intrinsic(_BitScanReverse)
184 # pragma intrinsic(_BitScanForward64)
185 # pragma intrinsic(_BitScanReverse64)
189 inline auto clz(uint32_t
x) ->
int {
191 _BitScanReverse(&r,
x);
197 return 31 ^
static_cast<int>(r);
199 # define FMT_BUILTIN_CLZ(n) detail::clz(n)
201 inline auto clzll(uint64_t
x) ->
int {
204 _BitScanReverse64(&r,
x);
207 if (_BitScanReverse(&r,
static_cast<uint32_t
>(
x >> 32)))
return 63 ^ (r + 32);
209 _BitScanReverse(&r,
static_cast<uint32_t
>(
x));
213 return 63 ^
static_cast<int>(r);
215 # define FMT_BUILTIN_CLZLL(n) detail::clzll(n)
217 inline auto ctz(uint32_t
x) ->
int {
219 _BitScanForward(&r,
x);
222 return static_cast<int>(r);
224 # define FMT_BUILTIN_CTZ(n) detail::ctz(n)
226 inline auto ctzll(uint64_t
x) ->
int {
231 _BitScanForward64(&r,
x);
234 if (_BitScanForward(&r,
static_cast<uint32_t
>(
x)))
return static_cast<int>(r);
236 _BitScanForward(&r,
static_cast<uint32_t
>(
x >> 32));
239 return static_cast<int>(r);
241 # define FMT_BUILTIN_CTZLL(n) detail::ctzll(n)
246 #ifdef FMT_HEADER_ONLY
247 # define FMT_HEADER_ONLY_CONSTEXPR20 FMT_CONSTEXPR20
249 # define FMT_HEADER_ONLY_CONSTEXPR20
255 template <
typename Streambuf>
class formatbuf :
public Streambuf {
258 using streamsize = decltype(std::declval<Streambuf>().sputn(
nullptr, 0));
275 if (!traits_type::eq_int_type(ch, traits_type::eof()))
287 template <
typename To,
typename From>
289 static_assert(
sizeof(To) ==
sizeof(From),
"size mismatch");
290 #ifdef __cpp_lib_bit_cast
294 std::memcpy(&to, &from,
sizeof(to));
301 #elif defined(__BIG_ENDIAN__)
303 #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__)
304 return __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__;
307 char data[
sizeof(int)];
309 return bit_cast<bytes>(1).data[0] == 0;
319 *
this = bit_cast<fallback_uintptr>(
p);
321 for (
size_t i = 0, j =
sizeof(
void*) - 1;
i < j; ++
i, --j)
329 return bit_cast<uintptr_t>(
p);
343 template <
typename T> constexpr
auto num_bits() ->
int {
344 return std::numeric_limits<T>::digits;
350 return static_cast<int>(
sizeof(
void*) *
351 std::numeric_limits<unsigned char>::digits);
356 #if FMT_HAS_BUILTIN(__builtin_assume)
357 __builtin_assume(condition);
362 template <
typename T>
367 template <
typename Char>
368 inline auto get_data(std::basic_string<Char>&
s) -> Char* {
371 template <
typename Container>
376 #if defined(_SECURE_SCL) && _SECURE_SCL
378 template <
typename T>
using checked_ptr = stdext::checked_array_iterator<T*>;
379 template <
typename T>
392 template <
typename Container, FMT_ENABLE_IF(is_contiguous<Container>::value)>
393 #if FMT_CLANG_VERSION >= 307 && !FMT_ICC_VERSION
397 reserve(std::back_insert_iterator<Container> it,
size_t n)
400 size_t size = c.size();
405 template <
typename T>
412 template <
typename Iterator>
413 constexpr
auto reserve(Iterator& it,
size_t) -> Iterator& {
417 template <
typename OutputIt>
421 template <
typename T,
typename OutputIt>
433 template <
typename Container, FMT_ENABLE_IF(is_contiguous<Container>::value)>
436 -> std::back_insert_iterator<Container> {
440 template <
typename Iterator>
447 template <
typename OutputIt,
typename Size,
typename T>
453 template <
typename T,
typename Size>
456 return fill_n<T*, Size, T>(out,
count,
value);
468 template <
typename OutChar,
typename InputIt,
typename OutputIt>
470 OutputIt out) -> OutputIt {
471 return copy_str<OutChar>(
begin,
end, out);
493 constexpr
const int masks[] = {0x00, 0x7f, 0x1f, 0x0f, 0x07};
494 constexpr
const uint32_t mins[] = {4194304, 0, 128, 2048, 65536};
495 constexpr
const int shiftc[] = {0, 18, 12, 6, 0};
496 constexpr
const int shifte[] = {0, 6, 4, 2, 0};
499 const char* next =
s +
len;
503 *c = uint32_t(
s[0] & masks[
len]) << 18;
504 *c |= uint32_t(
s[1] & 0x3f) << 12;
505 *c |= uint32_t(
s[2] & 0x3f) << 6;
506 *c |= uint32_t(
s[3] & 0x3f) << 0;
510 using uchar =
unsigned char;
511 *e = (*c < mins[
len]) << 6;
512 *e |= ((*c >> 11) == 0x1b) << 7;
513 *e |= (*c > 0x10FFFF) << 8;
514 *e |= (uchar(
s[1]) & 0xc0) >> 2;
515 *e |= (uchar(
s[2]) & 0xc0) >> 4;
516 *e |= uchar(
s[3]) >> 6;
527 template <
typename F>
529 auto decode = [f](
const char* buf_ptr,
const char*
ptr) {
530 auto cp = uint32_t();
538 const size_t block_size = 4;
539 if (
s.size() >= block_size) {
540 for (
auto end =
p +
s.size() - block_size + 1;
p <
end;) {
545 if (
auto num_chars_left =
s.data() +
s.size() -
p) {
546 char buf[2 * block_size - 1] = {};
547 copy_str<char>(
p,
p + num_chars_left, buf);
548 const char* buf_ptr = buf;
550 auto end = decode(buf_ptr,
p);
554 }
while (buf_ptr - buf < num_chars_left);
558 template <
typename Char>
565 size_t num_code_points = 0;
567 struct count_code_points {
577 (cp >= 0x2e80 && cp <= 0xa4cf && cp != 0x303f) ||
578 (cp >= 0xac00 && cp <= 0xd7a3) ||
579 (cp >= 0xf900 && cp <= 0xfaff) ||
580 (cp >= 0xfe10 && cp <= 0xfe19) ||
581 (cp >= 0xfe30 && cp <= 0xfe6f) ||
582 (cp >= 0xff00 && cp <= 0xff60) ||
583 (cp >= 0xffe0 && cp <= 0xffe6) ||
584 (cp >= 0x20000 && cp <= 0x2fffd) ||
585 (cp >= 0x30000 && cp <= 0x3fffd) ||
587 (cp >= 0x1f300 && cp <= 0x1f64f) ||
589 (cp >= 0x1f900 && cp <= 0x1f9ff))));
594 return num_code_points;
599 reinterpret_cast<const char*
>(
s.data()),
s.size()));
602 template <
typename Char>
604 size_t size =
s.size();
612 size_t num_code_points = 0;
614 if ((
data[
i] & 0xc0) != 0x80 && ++num_code_points >
n)
return i;
620 struct is_fast_float :
bool_constant<std::numeric_limits<T>::is_iec559 &&
621 sizeof(T) <= sizeof(double)> {};
622 template <typename T> struct is_fast_float<T, false> : std::false_type {};
624 #ifndef FMT_USE_FULL_CACHE_DRAGONBOX
625 # define FMT_USE_FULL_CACHE_DRAGONBOX 0
628 template <typename T>
629 template <typename U>
630 void buffer<T>::append(const U* begin, const U* end) {
631 while (begin != end) {
632 auto count = to_unsigned(end - begin);
633 try_reserve(size_ + count);
634 auto free_cap = capacity_ - size_;
635 if (free_cap < count) count = free_cap;
636 std::uninitialized_copy_n(begin, count, make_checked(ptr_ + size_, count));
642 template <typename T, typename Enable = void>
643 struct is_locale : std::false_type {};
644 template <typename T>
645 struct is_locale<T, void_t<decltype(T::classic())>> : std::true_type {};
648 FMT_MODULE_EXPORT_BEGIN
652 enum { inline_buffer_size = 500 };
675 template <typename T, size_t SIZE = inline_buffer_size,
676 typename Allocator = std::allocator<T>>
677 class basic_memory_buffer final : public detail::buffer<T> {
685 FMT_CONSTEXPR20 void deallocate() {
686 T* data = this->data();
687 if (data != store_) alloc_.deallocate(data, this->capacity());
698 const Allocator& alloc = Allocator())
700 this->
set(store_, SIZE);
710 alloc_ = std::move(other.
alloc_);
714 this->
set(store_, capacity);
723 this->
set(data, capacity);
766 void reserve(
size_t new_capacity) { this->try_reserve(new_capacity); }
770 template <
typename ContiguousRange>
776 template <
typename T,
size_t SIZE,
typename Allocator>
780 if (
size > 5000)
throw std::runtime_error(
"fuzz mode - won't grow that much");
782 const size_t max_size = std::allocator_traits<Allocator>::max_size(alloc_);
783 size_t old_capacity = this->capacity();
784 size_t new_capacity = old_capacity + old_capacity / 2;
785 if (
size > new_capacity)
787 else if (new_capacity > max_size)
788 new_capacity =
size > max_size ?
size : max_size;
789 T* old_data = this->
data();
791 std::allocator_traits<Allocator>::allocate(alloc_, new_capacity);
793 std::uninitialized_copy(old_data, old_data + this->
size(),
795 this->
set(new_data, new_capacity);
799 if (old_data != store_) alloc_.deallocate(old_data, old_capacity);
804 template <
typename T,
size_t SIZE,
typename Allocator>
818 :
std::runtime_error(message) {}
834 template <typename... Args, typename S, typename Char =
char_t<S>>
842 "passing views as lvalues is disallowed");
848 namespace detail_exported {
849 #if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
850 template <
typename Char,
size_t N>
struct fixed_string {
851 constexpr fixed_string(
const Char (&str)[N]) {
852 detail::copy_str<Char, const Char*, Char*>(
static_cast<const Char*
>(str),
860 template <
typename Char,
size_t N>
865 return {
s, N - (std::char_traits<Char>::to_int_type(
s[N - 1]) == 0 ? 1 : 0)};
867 template <
typename Char>
870 return {
s.data(),
s.size()};
876 template <
typename T>
struct is_integral : std::is_integral<T> {};
880 template <
typename T>
887 template <
typename T, FMT_ENABLE_IF(is_
signed<T>::value)>
891 template <
typename T, FMT_ENABLE_IF(!is_
signed<T>::value)>
896 template <
typename T, FMT_ENABLE_IF(std::is_
floating_po
int<T>::value)>
905 template <
typename T>
910 template <
typename T>
913 #define FMT_POWERS_OF_10(factor) \
914 factor * 10, (factor)*100, (factor)*1000, (factor)*10000, (factor)*100000, \
915 (factor)*1000000, (factor)*10000000, (factor)*100000000, \
921 return &
"0001020304050607080910111213141516171819"
922 "2021222324252627282930313233343536373839"
923 "4041424344454647484950515253545556575859"
924 "6061626364656667686970717273747576777879"
925 "8081828384858687888990919293949596979899"[
value * 2];
929 template <
typename Char,
typename Sign> constexpr Char
sign(Sign
s) {
930 #if !FMT_GCC_VERSION || FMT_GCC_VERSION >= 604
933 return static_cast<Char
>(
"\0-+ "[
s]);
943 if (
n < 100)
return count + 1;
944 if (
n < 1000)
return count + 2;
945 if (
n < 10000)
return count + 3;
956 #ifdef FMT_BUILTIN_CLZLL
959 inline auto do_count_digits(uint64_t
n) ->
int {
964 static constexpr uint8_t bsr2log10[] = {
965 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5,
966 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10,
967 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 15, 15,
968 15, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 19, 20};
969 auto t = bsr2log10[FMT_BUILTIN_CLZLL(
n | 1) ^ 63];
970 static constexpr
const uint64_t zero_or_powers_of_10[] = {
972 10000000000000000000ULL};
973 return t - (
n < zero_or_powers_of_10[t]);
980 #ifdef FMT_BUILTIN_CLZLL
982 return do_count_digits(
n);
989 template <
int BITS,
typename UInt>
991 #ifdef FMT_BUILTIN_CLZ
992 if (num_bits<UInt>() == 32)
993 return (FMT_BUILTIN_CLZ(
static_cast<uint32_t
>(
n) | 1) ^ 31) / BITS + 1;
1000 }
while ((
m >>= BITS) != 0);
1007 #ifdef FMT_BUILTIN_CLZ
1010 FMT_INLINE auto do_count_digits(uint32_t
n) ->
int {
1013 # define FMT_INC(T) (((sizeof(# T) - 1ull) << 32) - T)
1014 static constexpr uint64_t
table[] = {
1015 FMT_INC(0), FMT_INC(0), FMT_INC(0),
1016 FMT_INC(10), FMT_INC(10), FMT_INC(10),
1017 FMT_INC(100), FMT_INC(100), FMT_INC(100),
1018 FMT_INC(1000), FMT_INC(1000), FMT_INC(1000),
1019 FMT_INC(10000), FMT_INC(10000), FMT_INC(10000),
1020 FMT_INC(100000), FMT_INC(100000), FMT_INC(100000),
1021 FMT_INC(1000000), FMT_INC(1000000), FMT_INC(1000000),
1022 FMT_INC(10000000), FMT_INC(10000000), FMT_INC(10000000),
1023 FMT_INC(100000000), FMT_INC(100000000), FMT_INC(100000000),
1024 FMT_INC(1000000000), FMT_INC(1000000000), FMT_INC(1000000000),
1025 FMT_INC(1000000000), FMT_INC(1000000000)
1027 auto inc =
table[FMT_BUILTIN_CLZ(
n | 1) ^ 31];
1028 return static_cast<int>((
n + inc) >> 32);
1034 #ifdef FMT_BUILTIN_CLZ
1036 return do_count_digits(
n);
1057 template <
typename Char>
1059 template <
typename Char>
1069 template <
typename Char>
1072 return Char(decimal_point_impl<char>(loc));
1075 return decimal_point_impl<wchar_t>(loc);
1079 template <
typename Char>
auto equal2(
const Char* lhs,
const char* rhs) ->
bool {
1080 return lhs[0] == Char(rhs[0]) && lhs[1] == Char(rhs[1]);
1082 inline auto equal2(
const char* lhs,
const char* rhs) ->
bool {
1083 return memcmp(lhs, rhs, 2) == 0;
1087 template <
typename Char>
1090 memcpy(dst, src, 2);
1093 *dst++ =
static_cast<Char
>(*src++);
1094 *dst =
static_cast<Char
>(*src);
1105 template <
typename Char,
typename UInt>
1111 while (
value >= 100) {
1120 *--out =
static_cast<Char
>(
'0' +
value);
1128 template <
typename Char,
typename UInt,
typename Iterator,
1133 Char
buffer[digits10<UInt>() + 1];
1135 return {out, detail::copy_str_noinline<Char>(
buffer,
end, out)};
1138 template <
unsigned BASE_BITS,
typename Char,
typename UInt>
1140 bool upper =
false) -> Char* {
1144 const char* digits = upper ?
"0123456789ABCDEF" :
"0123456789abcdef";
1145 unsigned digit = (
value & ((1 << BASE_BITS) - 1));
1146 *--
buffer =
static_cast<Char
>(BASE_BITS < 4 ? static_cast<char>(
'0' + digit)
1148 }
while ((
value >>= BASE_BITS) != 0);
1152 template <
unsigned BASE_BITS,
typename Char>
1154 bool =
false) -> Char* {
1155 auto char_digits = std::numeric_limits<unsigned char>::digits / 4;
1156 int start = (num_digits + char_digits - 1) / char_digits - 1;
1157 if (
int start_digits = num_digits % char_digits) {
1165 for (
int i = 0;
i < char_digits; ++
i) {
1166 unsigned digit = (
value & ((1 << BASE_BITS) - 1));
1167 *--
p =
static_cast<Char
>(
"0123456789abcdef"[digit]);
1168 value >>= BASE_BITS;
1174 template <
unsigned BASE_BITS,
typename Char,
typename It,
typename UInt>
1178 format_uint<BASE_BITS>(
ptr,
value, num_digits, upper);
1182 char buffer[num_bits<UInt>() / BASE_BITS + 1];
1183 format_uint<BASE_BITS>(
buffer,
value, num_digits, upper);
1184 return detail::copy_str_noinline<Char>(
buffer,
buffer + num_digits, out);
1195 auto size() const ->
size_t {
return buffer_.
size() - 1; }
1196 auto c_str() const -> const
wchar_t* {
return &buffer_[0]; }
1197 auto str() const ->
std::wstring {
return {&buffer_[0],
size()}; }
1200 namespace dragonbox {
1207 static const int significand_bits = 23;
1208 static const int exponent_bits = 8;
1209 static const int min_exponent = -126;
1210 static const int max_exponent = 127;
1211 static const int exponent_bias = -127;
1212 static const int decimal_digits = 9;
1213 static const int kappa = 1;
1214 static const int big_divisor = 100;
1215 static const int small_divisor = 10;
1216 static const int min_k = -31;
1217 static const int max_k = 46;
1218 static const int cache_bits = 64;
1219 static const int divisibility_check_by_5_threshold = 39;
1220 static const int case_fc_pm_half_lower_threshold = -1;
1221 static const int case_fc_pm_half_upper_threshold = 6;
1222 static const int case_fc_lower_threshold = -2;
1223 static const int case_fc_upper_threshold = 6;
1224 static const int case_shorter_interval_left_endpoint_lower_threshold = 2;
1225 static const int case_shorter_interval_left_endpoint_upper_threshold = 3;
1226 static const int shorter_interval_tie_lower_threshold = -35;
1227 static const int shorter_interval_tie_upper_threshold = -35;
1228 static const int max_trailing_zeros = 7;
1233 static const int significand_bits = 52;
1234 static const int exponent_bits = 11;
1235 static const int min_exponent = -1022;
1236 static const int max_exponent = 1023;
1237 static const int exponent_bias = -1023;
1238 static const int decimal_digits = 17;
1239 static const int kappa = 2;
1240 static const int big_divisor = 1000;
1241 static const int small_divisor = 100;
1242 static const int min_k = -292;
1243 static const int max_k = 326;
1244 static const int cache_bits = 128;
1245 static const int divisibility_check_by_5_threshold = 86;
1246 static const int case_fc_pm_half_lower_threshold = -2;
1247 static const int case_fc_pm_half_upper_threshold = 9;
1248 static const int case_fc_lower_threshold = -4;
1249 static const int case_fc_upper_threshold = 9;
1250 static const int case_shorter_interval_left_endpoint_lower_threshold = 2;
1251 static const int case_shorter_interval_left_endpoint_upper_threshold = 3;
1252 static const int shorter_interval_tie_lower_threshold = -77;
1253 static const int shorter_interval_tie_upper_threshold = -77;
1254 static const int max_trailing_zeros = 16;
1263 template <
typename T>
1267 template <
typename T>
1276 template <
typename Char,
typename It>
1280 *it++ =
static_cast<Char
>(
'-');
1283 *it++ =
static_cast<Char
>(
'+');
1287 if (
exp >= 1000) *it++ =
static_cast<Char
>(top[0]);
1288 *it++ =
static_cast<Char
>(top[1]);
1292 *it++ =
static_cast<Char
>(
d[0]);
1293 *it++ =
static_cast<Char
>(
d[1]);
1297 template <
typename T>
1300 buffer<char>& buf) -> int;
1303 template <
typename T>
1305 buffer<char>& buf) -> int;
1311 return static_cast<double>(
value);
1314 template <
typename OutputIt,
typename Char>
1317 auto fill_size =
fill.size();
1320 for (
size_t i = 0;
i <
n; ++
i)
1321 it = copy_str<Char>(
data,
data + fill_size, it);
1332 size_t size,
size_t width, F&& f) -> OutputIt {
1335 size_t padding = spec_width > width ? spec_width - width : 0;
1338 auto* shifts = align ==
align::left ?
"\x1f\x1f\x00\x01" :
"\x00\x1f\x00\x01";
1339 size_t left_padding = padding >> shifts[specs.align];
1340 size_t right_padding = padding - left_padding;
1341 auto it =
reserve(out,
size + padding * specs.fill.size());
1342 if (left_padding != 0) it =
fill(it, left_padding, specs.fill);
1344 if (right_padding != 0) it =
fill(it, right_padding, specs.fill);
1351 size_t size, F&& f) -> OutputIt {
1352 return write_padded<align>(out, specs,
size,
size, f);
1355 template <align::type align = align::left,
typename Char,
typename OutputIt>
1359 return write_padded<align>(
1361 const char* data = bytes.data();
1362 return copy_str<Char>(data, data + bytes.size(), it);
1366 template <
typename Char,
typename OutputIt,
typename UIntPtr>
1372 *it++ =
static_cast<Char
>(
'0');
1373 *it++ =
static_cast<Char
>(
'x');
1374 return format_uint<4, Char>(it,
value, num_digits);
1376 return specs ? write_padded<align::right>(out, *specs,
size,
write)
1380 template <
typename Char,
typename OutputIt>
1389 template <
typename Char,
typename OutputIt>
1395 :
write(out, static_cast<int>(
value), specs, loc);
1410 padding = width -
size;
1413 }
else if (specs.
precision > num_digits) {
1424 template <
typename OutputIt,
typename Char,
typename W>
1428 W write_digits) -> OutputIt {
1433 for (
unsigned p = prefix & 0xffffff;
p != 0;
p >>= 8)
1434 *it++ =
static_cast<Char
>(
p & 0xff);
1439 return write_padded<align::right>(
1441 for (unsigned p = prefix & 0xffffff; p != 0; p >>= 8)
1442 *it++ = static_cast<Char>(p & 0xff);
1443 it = detail::fill_n(it, data.padding, static_cast<Char>(
'0'));
1444 return write_digits(it);
1463 if (*state.
group <= 0 || *state.
group == max_value<char>())
1464 return max_value<int>();
1472 sep_ = thousands_sep<Char>(loc);
1482 auto state = initial_state();
1483 while (num_digits > next(state)) ++
count;
1488 template <
typename Out,
typename C>
1490 auto num_digits =
static_cast<int>(digits.
size());
1492 separators.push_back(0);
1493 auto state = initial_state();
1494 while (
int i = next(state)) {
1495 if (
i >= num_digits)
break;
1496 separators.push_back(
i);
1498 for (
int i = 0, sep_index =
static_cast<int>(separators.size() - 1);
1499 i < num_digits; ++
i) {
1500 if (num_digits -
i == separators[sep_index]) {
1501 *out++ = separator();
1510 template <
typename OutputIt,
typename UInt,
typename Char>
1519 grouping.count_separators(num_digits));
1520 return write_padded<align::right>(
1522 if (prefix != 0) *it++ =
static_cast<Char
>(prefix);
1527 template <
typename OutputIt,
typename UInt,
typename Char>
1538 prefix += (1
u + (
value > 0xff ? 1 : 0)) << 24;
1546 template <
typename T>
1552 prefix = 0x01000000 |
'-';
1553 abs_value = 0 - abs_value;
1555 constexpr
const unsigned prefixes[4] = {0, 0, 0x1000000
u |
'+',
1557 prefix = prefixes[
sign];
1559 return {abs_value, prefix};
1562 template <
typename Char,
typename OutputIt,
typename T>
1567 auto abs_value =
arg.abs_value;
1568 auto prefix =
arg.prefix;
1569 switch (specs.
type) {
1571 case presentation_type::dec: {
1574 prefix, specs, loc)) {
1580 return format_decimal<Char>(it, abs_value, num_digits).end;
1583 case presentation_type::hex_lower:
1584 case presentation_type::hex_upper: {
1585 bool upper = specs.
type == presentation_type::hex_upper;
1587 prefix_append(prefix,
unsigned(upper ?
'X' :
'x') << 8 |
'0');
1591 return format_uint<4, Char>(it, abs_value, num_digits, upper);
1594 case presentation_type::bin_lower:
1595 case presentation_type::bin_upper: {
1596 bool upper = specs.
type == presentation_type::bin_upper;
1598 prefix_append(prefix,
unsigned(upper ?
'B' :
'b') << 8 |
'0');
1599 int num_digits = count_digits<1>(abs_value);
1600 return write_int(out, num_digits, prefix, specs,
1602 return format_uint<1, Char>(it, abs_value, num_digits);
1605 case presentation_type::oct: {
1606 int num_digits = count_digits<3>(abs_value);
1609 if (specs.
alt && specs.
precision <= num_digits && abs_value != 0)
1611 return write_int(out, num_digits, prefix, specs,
1613 return format_uint<3, Char>(it, abs_value, num_digits);
1616 case presentation_type::chr:
1617 return write_char(out,
static_cast<Char
>(abs_value), specs);
1623 template <
typename Char,
typename OutputIt,
typename T>
1629 template <
typename Char,
typename OutputIt,
typename T,
1632 std::is_same<OutputIt, buffer_appender<Char>>::
value)>
1640 template <
typename Char,
typename OutputIt,
typename T,
1643 !std::is_same<OutputIt, buffer_appender<Char>>::
value)>
1646 locale_ref loc) -> OutputIt {
1650 template <
typename Char,
typename OutputIt>
1653 auto data =
s.data();
1654 auto size =
s.size();
1664 template <
typename Char,
typename OutputIt>
1670 return write(out,
s, specs);
1672 template <
typename Char,
typename OutputIt>
1681 template <
typename Char,
typename OutputIt>
1686 isinf ? (fspecs.upper ?
"INF" :
"inf") : (fspecs.upper ?
"NAN" :
"nan");
1687 constexpr
size_t str_size = 3;
1688 auto sign = fspecs.sign;
1689 auto size = str_size + (
sign ? 1 : 0);
1691 const bool is_zero_fill =
1692 specs.
fill.size() == 1 && *specs.
fill.data() ==
static_cast<Char
>(
'0');
1693 if (is_zero_fill) specs.
fill[0] =
static_cast<Char
>(
' ');
1695 if (
sign) *it++ = detail::sign<Char>(
sign);
1696 return copy_str<Char>(str, str + str_size, it);
1708 return fp.significand_size;
1710 template <
typename T>
1715 template <
typename Char,
typename OutputIt>
1717 int significand_size) -> OutputIt {
1718 return copy_str<Char>(significand, significand + significand_size, out);
1720 template <
typename Char,
typename OutputIt,
typename UInt>
1722 int significand_size) -> OutputIt {
1723 return format_decimal<Char>(out, significand, significand_size).end;
1725 template <
typename Char,
typename OutputIt,
typename T,
typename Grouping>
1727 int significand_size,
int exponent,
1728 const Grouping& grouping) -> OutputIt {
1729 if (!grouping.separator()) {
1730 out = write_significand<Char>(out, significand, significand_size);
1734 write_significand<char>(
appender(
buffer), significand, significand_size);
1739 template <
typename Char,
typename UInt,
1745 out += significand_size + 1;
1747 int floating_size = significand_size - integral_size;
1748 for (
int i = floating_size / 2;
i > 0; --
i) {
1753 if (floating_size % 2 != 0) {
1754 *--out =
static_cast<Char
>(
'0' + significand % 10);
1762 template <
typename OutputIt,
typename UInt,
typename Char,
1765 int significand_size,
int integral_size,
1768 Char
buffer[digits10<UInt>() + 2];
1771 return detail::copy_str_noinline<Char>(
buffer,
end, out);
1774 template <
typename OutputIt,
typename Char>
1776 int significand_size,
int integral_size,
1778 out = detail::copy_str_noinline<Char>(significand,
1779 significand + integral_size, out);
1782 return detail::copy_str_noinline<Char>(significand + integral_size,
1783 significand + significand_size, out);
1786 template <
typename OutputIt,
typename Char,
typename T,
typename Grouping>
1788 int significand_size,
int integral_size,
1790 const Grouping& grouping) -> OutputIt {
1791 if (!grouping.separator()) {
1800 return detail::copy_str_noinline<Char>(
buffer.
data() + integral_size,
1804 template <
typename OutputIt,
typename DecimalFP,
typename Char,
1805 typename Grouping = digit_grouping<Char>>
1810 auto significand =
fp.significand;
1812 constexpr Char zero =
static_cast<Char
>(
'0');
1813 auto sign = fspecs.sign;
1818 fspecs.locale ? detail::decimal_point<Char>(loc) :
static_cast<Char
>(
'.');
1820 int output_exp =
fp.exponent + significand_size - 1;
1821 auto use_exp_format = [=]() {
1822 if (fspecs.format == float_format::exp)
return true;
1823 if (fspecs.format != float_format::general)
return false;
1828 output_exp >= (fspecs.precision > 0 ? fspecs.precision :
exp_upper);
1830 if (use_exp_format()) {
1832 if (fspecs.showpoint) {
1833 num_zeros = fspecs.precision - significand_size;
1834 if (num_zeros < 0) num_zeros = 0;
1836 }
else if (significand_size == 1) {
1839 auto abs_output_exp = output_exp >= 0 ? output_exp : -output_exp;
1841 if (abs_output_exp >= 100) exp_digits = abs_output_exp >= 1000 ? 4 : 3;
1844 char exp_char = fspecs.upper ?
'E' :
'e';
1845 auto write = [=](iterator it) {
1846 if (
sign) *it++ = detail::sign<Char>(
sign);
1851 *it++ =
static_cast<Char
>(exp_char);
1852 return write_exponent<Char>(output_exp, it);
1854 return specs.
width > 0 ? write_padded<align::right>(out, specs,
size,
write)
1858 int exp =
fp.exponent + significand_size;
1859 if (
fp.exponent >= 0) {
1862 int num_zeros = fspecs.precision -
exp;
1864 if (num_zeros > 5000)
1865 throw std::runtime_error(
"fuzz mode - avoiding excessive cpu use");
1867 if (fspecs.showpoint) {
1868 if (num_zeros <= 0 && fspecs.format != float_format::fixed) num_zeros = 1;
1871 auto grouping = Grouping(loc, fspecs.locale);
1873 return write_padded<align::right>(out, specs,
size, [&](iterator it) {
1874 if (
sign) *it++ = detail::sign<Char>(
sign);
1875 it = write_significand<Char>(it, significand, significand_size,
1876 fp.exponent, grouping);
1877 if (!fspecs.showpoint)
return it;
1881 }
else if (
exp > 0) {
1883 int num_zeros = fspecs.showpoint ? fspecs.precision - significand_size : 0;
1885 auto grouping = Grouping(loc, fspecs.locale);
1887 return write_padded<align::right>(out, specs,
size, [&](iterator it) {
1888 if (
sign) *it++ = detail::sign<Char>(
sign);
1895 int num_zeros = -
exp;
1896 if (significand_size == 0 && fspecs.precision >= 0 &&
1897 fspecs.precision < num_zeros) {
1898 num_zeros = fspecs.precision;
1900 bool pointy = num_zeros != 0 || significand_size != 0 || fspecs.showpoint;
1902 return write_padded<align::right>(out, specs,
size, [&](iterator it) {
1903 if (
sign) *it++ = detail::sign<Char>(
sign);
1905 if (!pointy)
return it;
1908 return write_significand<Char>(it, significand, significand_size);
1920 template <
typename Out,
typename C>
1926 template <
typename OutputIt,
typename DecimalFP,
typename Char>
1940 template <
typename T, FMT_ENABLE_IF(std::is_
floating_po
int<T>::value)>
1943 #if defined(__cpp_if_constexpr)
1944 if constexpr (std::numeric_limits<double>::is_iec559) {
1945 auto bits = detail::bit_cast<uint64_t>(
static_cast<double>(
value));
1946 constexpr
auto significand_bits =
1948 return (
bits & exponent_mask<double>()) &&
1949 !(
bits & ((uint64_t(1) << significand_bits) - 1));
1956 template <
typename T, FMT_ENABLE_IF(std::is_
floating_po
int<T>::value)>
1959 #if defined(__cpp_if_constexpr)
1960 if constexpr (std::numeric_limits<double>::is_iec559) {
1961 auto bits = detail::bit_cast<uint64_t>(
static_cast<double>(
value));
1962 return (bits & exponent_mask<double>()) != exponent_mask<double>();
1969 template <
typename T, FMT_ENABLE_IF(std::is_
floating_po
int<T>::value)>
1972 #ifdef __cpp_if_constexpr
1973 if constexpr (std::numeric_limits<double>::is_iec559) {
1974 auto bits = detail::bit_cast<uint64_t>(
static_cast<double>(
value));
1975 return (
bits & (uint64_t(1) << (num_bits<uint64_t>() - 1))) != 0;
1982 template <
typename Char,
typename OutputIt,
typename T,
1989 fspecs.sign = specs.
sign;
2002 *it++ = detail::sign<Char>(fspecs.sign);
2009 if (fspecs.format == float_format::hex) {
2010 if (fspecs.sign) buffer.push_back(detail::sign<char>(fspecs.sign));
2012 return write_bytes<align::right>(out, {buffer.data(), buffer.size()},
2018 if (fspecs.format == float_format::exp) {
2024 if (
const_check(std::is_same<T, float>())) fspecs.binary32 =
true;
2025 if (!is_fast_float<T>()) fspecs.fallback =
true;
2028 auto fp = big_decimal_fp{buffer.data(),
static_cast<int>(buffer.size()), exp};
2032 template <
typename Char,
typename OutputIt,
typename T,
2052 uint mask = exponent_mask<floaty>();
2053 if ((
bits & mask) == mask)
2060 template <
typename Char,
typename OutputIt,
typename T,
2063 inline auto write(OutputIt out,
T value) -> OutputIt {
2067 template <
typename Char,
typename OutputIt>
2069 locale_ref = {}) -> OutputIt {
2074 template <
typename Char,
typename OutputIt>
2078 it = copy_str_noinline<Char>(
value.begin(),
value.end(), it);
2082 template <
typename Char,
typename OutputIt,
typename T,
2088 template <
typename Char,
typename OutputIt,
typename T,
2093 auto abs_value =
static_cast<uint32_or_64_or_128_t<T>
>(
value);
2096 if (negative) abs_value = ~abs_value + 1;
2098 auto size = (negative ? 1 : 0) +
static_cast<size_t>(num_digits);
2100 if (
auto ptr = to_pointer<Char>(it,
size)) {
2101 if (negative) *
ptr++ =
static_cast<Char
>(
'-');
2102 format_decimal<Char>(
ptr, abs_value, num_digits);
2105 if (negative) *it++ =
static_cast<Char
>(
'-');
2106 it = format_decimal<Char>(it, abs_value, num_digits).end;
2112 typename Char,
typename OutputIt,
typename T,
2115 mapped_type_constant<T, basic_format_context<OutputIt, Char>>
::value !=
2123 template <
typename Char,
typename OutputIt,
typename T,
2127 locale_ref = {}) -> OutputIt {
2129 specs.
type != presentation_type::string
2134 template <
typename Char,
typename OutputIt>
2141 template <
typename Char,
typename OutputIt>
2152 template <
typename Char,
typename OutputIt,
typename T,
2162 template <
typename Char,
typename OutputIt,
typename T,
2163 typename Context = basic_format_context<OutputIt, Char>>
2167 !std::is_same<
const T&,
2173 template <
typename Char,
typename OutputIt,
typename T,
2178 using formatter_type =
2180 typename Context::template formatter_type<T>,
2181 fallback_formatter<T, Char>>;
2182 auto ctx = Context(out, {}, {});
2183 return formatter_type().format(
value, ctx);
2197 return write<Char>(out,
value);
2201 context format_ctx(out, args, loc);
2202 h.format(parse_ctx, format_ctx);
2203 return format_ctx.out();
2215 template <
typename T>
2232 h.format(parse_ctx, ctx);
2237 template <
typename T>
2247 template <
typename T, FMT_ENABLE_IF(is_
integer<T>::value)>
2250 return static_cast<unsigned long long>(
value);
2253 template <
typename T, FMT_ENABLE_IF(!is_
integer<T>::value)>
2255 handler_.on_error(
"width is not integer");
2267 template <
typename T, FMT_ENABLE_IF(is_
integer<T>::value)>
2270 return static_cast<unsigned long long>(
value);
2273 template <
typename T, FMT_ENABLE_IF(!is_
integer<T>::value)>
2275 handler_.on_error(
"precision is not integer");
2283 template <
template <
typename>
class Handler,
typename FormatArg,
2284 typename ErrorHandler>
2287 if (
value >
to_unsigned(max_value<int>())) eh.on_error(
"number is too big");
2288 return static_cast<int>(
value);
2291 template <
typename Context,
typename ID>
2293 typename Context::format_arg {
2294 auto arg = ctx.arg(
id);
2295 if (!
arg) ctx.on_error(
"argument not found");
2326 :
specs_setter<Char>(specs), parse_context_(parse_ctx), context_(ctx) {}
2329 this->specs_.width = get_dynamic_spec<width_checker>(
2334 this->specs_.precision = get_dynamic_spec<precision_checker>(
2341 template <
template <
typename>
class Handler,
typename Context>
2349 value = detail::get_dynamic_spec<Handler>(ctx.arg(ref.
val.
index),
2350 ctx.error_handler());
2352 case arg_id_kind::name:
2353 value = detail::get_dynamic_spec<Handler>(ctx.arg(ref.
val.
name),
2354 ctx.error_handler());
2359 #define FMT_STRING_IMPL(s, base, explicit) \
2363 struct FMT_GCC_VISIBILITY_HIDDEN FMT_COMPILE_STRING : base { \
2364 using char_type = fmt::remove_cvref_t<decltype(s[0])>; \
2365 FMT_MAYBE_UNUSED FMT_CONSTEXPR explicit \
2366 operator fmt::basic_string_view<char_type>() const { \
2367 return fmt::detail_exported::compile_string_to_view<char_type>(s); \
2370 return FMT_COMPILE_STRING(); \
2383 #define FMT_STRING(s) FMT_STRING_IMPL(s, fmt::compile_string, )
2385 #if FMT_USE_USER_DEFINED_LITERALS
2386 template <
typename Char>
struct udl_formatter {
2387 basic_string_view<Char> str;
2389 template <
typename...
T>
2390 auto operator()(
T&&... args)
const -> std::basic_string<Char> {
2391 return vformat(str, fmt::make_args_checked<T...>(str, args...));
2395 # if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
2396 template <
typename T,
typename Char,
size_t N,
2397 fmt::detail_exported::fixed_string<Char, N> Str>
2398 struct statically_named_arg : view {
2399 static constexpr
auto name = Str.data;
2402 statically_named_arg(
const T& v) :
value(v) {}
2405 template <
typename T,
typename Char,
size_t N,
2406 fmt::detail_exported::fixed_string<Char, N> Str>
2407 struct is_named_arg<statically_named_arg<
T, Char, N, Str>> : std::true_type {};
2409 template <
typename T,
typename Char,
size_t N,
2410 fmt::detail_exported::fixed_string<Char, N> Str>
2411 struct is_statically_named_arg<statically_named_arg<
T, Char, N, Str>>
2412 : std::true_type {};
2414 template <
typename Char,
size_t N,
2415 fmt::detail_exported::fixed_string<Char, N> Str>
2417 template <
typename T>
auto operator=(
T&&
value)
const {
2418 return statically_named_arg<T, Char, N, Str>(std::forward<T>(
value));
2422 template <
typename Char>
struct udl_arg {
2425 template <
typename T>
auto operator=(
T&&
value)
const -> named_arg<Char, T> {
2426 return {str, std::forward<T>(
value)};
2430 #endif // FMT_USE_USER_DEFINED_LITERALS
2432 template <
typename Locale,
typename Char>
2435 -> std::basic_string<Char> {
2470 template <
typename...
T>
2506 mutable char buffer_[buffer_size];
2516 bool negative =
value < 0;
2517 if (negative) abs_value = 0 - abs_value;
2518 auto begin = format_unsigned(abs_value);
2519 if (negative) *--
begin =
'-';
2530 : str_(format_unsigned(
value)) {}
2541 auto data() const -> const
char* {
return str_; }
2548 buffer_[buffer_size - 1] =
'\0';
2557 auto str() const ->
std::
string {
return std::string(str_,
size()); }
2560 template <
typename T,
typename Char>
2561 template <
typename FormatContext>
2567 const -> decltype(ctx.out()) {
2570 auto specs = specs_;
2571 detail::handle_dynamic_spec<detail::width_checker>(specs.
width,
2572 specs.width_ref, ctx);
2573 detail::handle_dynamic_spec<detail::precision_checker>(
2574 specs.
precision, specs.precision_ref, ctx);
2575 return detail::write<Char>(ctx.out(), val, specs, ctx.locale());
2577 return detail::write<Char>(ctx.out(), val, specs_, ctx.locale());
2580 #define FMT_FORMAT_AS(Type, Base) \
2581 template <typename Char> \
2582 struct formatter<Type, Char> : formatter<Base, Char> { \
2583 template <typename FormatContext> \
2584 auto format(Type const& val, FormatContext& ctx) const \
2585 -> decltype(ctx.out()) { \
2586 return formatter<Base, Char>::format(static_cast<Base>(val), ctx); \
2602 template <
typename Char>
2604 template <
typename FormatContext>
2605 auto format(
void* val, FormatContext& ctx)
const -> decltype(ctx.out()) {
2610 template <
typename Char,
size_t N>
2612 template <
typename FormatContext>
2614 -> decltype(ctx.out()) {
2643 detail::handle_dynamic_spec<detail::width_checker>(specs_.
width,
2645 detail::handle_dynamic_spec<detail::precision_checker>(
2650 template <
typename ParseContext>
2652 format_str_ = ctx.begin();
2658 template <
typename T,
typename FormatContext>
2659 auto format(
const T& val, FormatContext& ctx) -> decltype(ctx.out()) {
2667 return detail::write<Char>(ctx.out(), val, specs_, ctx.locale());
2680 template <
typename T>
auto ptr(
T p) ->
const void* {
2682 return detail::bit_cast<const void*>(
p);
2684 template <
typename T>
auto ptr(
const std::unique_ptr<T>&
p) ->
const void* {
2687 template <
typename T>
auto ptr(
const std::shared_ptr<T>&
p) ->
const void* {
2705 template <
typename ParseContext>
2709 detail::type::string_type);
2715 template <
typename FormatContext>
2717 detail::handle_dynamic_spec<detail::width_checker>(specs_.
width,
2719 detail::handle_dynamic_spec<detail::precision_checker>(
2748 template <
typename ParseContext>
2752 detail::type::int_type);
2758 template <
typename FormatContext>
2760 -> decltype(ctx.out()) {
2761 detail::handle_dynamic_spec<detail::width_checker>(specs_.
width,
2763 detail::handle_dynamic_spec<detail::precision_checker>(
2771 template <
typename It,
typename Sentinel,
typename Char =
char>
2781 template <
typename It,
typename Sentinel,
typename Char>
2784 template <
typename It,
typename Sentinel,
typename Char>
2788 #ifdef __cpp_lib_ranges
2789 std::iter_value_t<It>;
2796 template <
typename T, FMT_ENABLE_IF(has_formatter<T, context>::value)>
2800 template <
typename T, FMT_ENABLE_IF(!has_formatter<T, context>::value)>
2805 using formatter_type =
2808 std::declval<const value_type&>()))>,
2815 template <
typename ParseContext>
2817 return value_formatter_.parse(ctx);
2820 template <
typename FormatContext>
2822 -> decltype(ctx.out()) {
2823 auto it =
value.begin;
2824 auto out = ctx.out();
2825 if (it !=
value.end) {
2826 out = value_formatter_.format(
map(*it), ctx);
2828 while (it !=
value.end) {
2829 out = detail::copy_str<Char>(
value.sep.begin(),
value.sep.end(), out);
2830 ctx.advance_to(out);
2831 out = value_formatter_.format(
map(*it), ctx);
2843 template <
typename It,
typename Sentinel>
2864 template <
typename Range>
2881 template <
typename T, FMT_ENABLE_IF(!std::is_
integral<T>::value)>
2883 auto result = std::string();
2884 detail::write<char>(std::back_inserter(
result),
value);
2888 template <
typename T, FMT_ENABLE_IF(std::is_
integral<T>::value)>
2892 constexpr
int max_size = detail::digits10<T>() + 2;
2893 char buffer[max_size > 5 ?
static_cast<unsigned>(max_size) : 5];
2894 char*
begin = buffer;
2898 template <
typename Char,
size_t SIZE>
2900 -> std::basic_string<Char> {
2901 auto size = buf.size();
2903 return std::basic_string<Char>(buf.data(),
size);
2908 template <
typename Char>
2929 auto arg = args.get(0);
2941 : parse_context(str), context(out, args, loc) {}
2943 void on_text(
const Char*
begin,
const Char*
end) {
2955 int arg_id = context.
arg_id(
id);
2956 if (arg_id < 0) on_error(
"argument not found");
2960 FMT_INLINE void on_replacement_field(
int id,
const Char*) {
2968 auto on_format_specs(
int id,
const Char*
begin,
const Char*
end)
2971 if (
arg.type() == type::custom_type) {
2975 return parse_context.
begin();
2982 on_error(
"missing '}' in format string");
2988 detail::parse_format_string<false>(
fmt, format_handler(out,
fmt, args, loc));
2991 #ifndef FMT_HEADER_ONLY
2993 -> thousands_sep_result<char>;
2995 -> thousands_sep_result<wchar_t>;
2999 float_specs specs, buffer<char>& buf)
3003 buffer<char>& buf) -> int;
3004 void snprintf_float(
float,
int, float_specs, buffer<char>&) =
delete;
3007 buffer<char>& buf) -> int;
3011 buffer<char>& buf) -> int;
3012 #endif // FMT_HEADER_ONLY
3016 #if FMT_USE_USER_DEFINED_LITERALS
3017 inline namespace literals {
3028 # if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
3029 template <detail_exported::fixed_
string Str>
3030 constexpr
auto operator""_a()
3032 sizeof(Str.data) /
sizeof(decltype(Str.data[0])), Str> {
3036 constexpr
auto operator"" _a(
const char*
s,
size_t) -> detail::udl_arg<char> {
3044 -> detail::udl_formatter<char> {
3048 #endif // FMT_USE_USER_DEFINED_LITERALS
3050 template <
typename Locale, FMT_ENABLE_IF(detail::is_locale<Locale>::value)>
3056 template <
typename Locale,
typename...
T,
3063 template <
typename...
T,
size_t SIZE,
typename Allocator>
3071 template <
typename OutputIt,
typename Locale,
3077 auto&& buf = get_buffer<char>(out);
3082 template <
typename OutputIt,
typename Locale,
typename...
T,
3093 #ifdef FMT_DEPRECATED_INCLUDE_XCHAR
3097 #ifdef FMT_HEADER_ONLY
3098 # define FMT_FUNC inline
3104 #endif // FMT_FORMAT_H_
auto out() -> iterator
Definition: core.h:1785
GeneratorWrapper< T > map(Func &&function, GeneratorWrapper< U > &&generator)
Definition: catch.hpp:4276
wchar_t value_type
Definition: core.h:807
class RadioSocket __attribute__
const SPDLOG_INLINE string_view_t & to_string_view(spdlog::level::level_enum l) SPDLOG_NOEXCEPT
Definition: common-inl.h:23
basic_string_view< Char > sep
Definition: format.h:2775
int index
Definition: core.h:2125
void print(std::FILE *f, const text_style &ts, const S &format_str, const Args &... args)
Definition: color.h:549
union fmt::v8::detail::arg_ref::value val
string_view data_
Definition: format.h:2693
auto group_digits(T value) -> group_digits_view< T >
Definition: format.h:2739
typename detail::char_t_impl< S >::type char_t
Definition: core.h:623
decltype(std::begin(std::declval< T & >())) iterator_t
Definition: format.h:363
auto format_float(T value, int precision, float_specs specs, buffer< char > &buf) -> int
bool isinf(T value)
Definition: format.h:1941
void check_format_string(const S &)
Definition: core.h:601
auto write_char(OutputIt out, Char value, const basic_format_specs< Char > &specs) -> OutputIt
Definition: format.h:1381
basic_string_view< char > string_view
Definition: core.h:540
void on_error(const char *message)
Definition: core.h:1782
Out apply(Out out, basic_string_view< C > digits) const
Definition: format.h:1489
byte
Definition: core.h:388
remove_cvref_t< decltype(*detail::range_begin(std::declval< Range >()))> value_type
Definition: ranges.h:226
constexpr const char * digits2(size_t value)
Definition: format.h:919
GeneratorWrapper< std::tuple< Ts... > > table(std::initializer_list< std::tuple< typename std::decay< Ts >::type... >> tuples)
Definition: catch.hpp:4052
@ minus
Definition: core.h:2025
auto get_buffer(OutputIt out) -> iterator_buffer< OutputIt, T >
Definition: core.h:1027
auto write(OutputIt out, const T &value) -> enable_if_t< std::is_class< T >::value &&!is_string< T >::value &&!std::is_same< T, Char >::value &&!std::is_same< const T &, decltype(arg_mapper< Context >().map(value))>::value, OutputIt >
Definition: format.h:2164
auto code_point_length(const Char *begin) -> int
Definition: core.h:2244
auto c_str() const -> const wchar_t *
Definition: format.h:1196
int exponent
Definition: format.h:1260
void on_sign(sign_t s)
Definition: core.h:2835
void end_precision()
Definition: core.h:2859
auto write_ptr(OutputIt out, UIntPtr value, const basic_format_specs< Char > *specs) -> OutputIt
Definition: format.h:1367
constexpr auto exponent_mask() -> typename dragonbox::float_info< T >::carrier_uint
Definition: format.h:1268
#define FMT_USE_LONG_DOUBLE
Definition: core.h:211
bytes(string_view data)
Definition: format.h:2697
void check_arg_id(int)
Definition: core.h:683
auto str() const -> std::wstring
Definition: format.h:1197
auto thousands_sep(locale_ref loc) -> thousands_sep_result< wchar_t >
Definition: format.h:1065
end IFFT Reshape the symbol vector into two different spatial streams size
Definition: generate_data.m:73
constexpr Char separator() const
Definition: format.h:1916
void assume(bool condition)
Definition: format.h:354
#define FMT_MSC_WARNING(...)
Definition: core.h:63
void push_back(const T &value)
Definition: core.h:849
void on_error(const char *message)
Definition: format.h:2338
auto format(const Locale &loc, format_string< T... > fmt, T &&... args) -> std::string
Definition: format.h:3058
join_view(It b, Sentinel e, basic_string_view< Char > s)
Definition: format.h:2777
Definition: format.h:2263
#define FMT_API
Definition: core.h:269
auto decimal_point_impl(locale_ref loc) -> Char
Definition: format-inl.h:117
int significand_size
Definition: format.h:1703
#define FMT_CLASS_API
Definition: core.h:261
conditional_t< num_bits< T >()<=32 &&! 0, uint32_t, conditional_t< num_bits< T >()<=64, uint64_t, uint128_t > > uint32_or_64_or_128_t
Definition: format.h:909
GeneratorWrapper< T > value(T &&value)
Definition: catch.hpp:3999
void on_dynamic_width(Id arg_id)
Definition: format.h:2328
@ left
Definition: core.h:2021
auto to_pointer(buffer_appender< T > it, size_t n) -> T *
Definition: format.h:425
fallback_uintptr uintptr_t
Definition: format.h:332
~basic_memory_buffer()
Definition: format.h:705
#define FMT_USE_DOUBLE
Definition: core.h:208
constexpr Char sign(Sign s)
Definition: format.h:929
#define FMT_INLINE
Definition: core.h:218
conditional_t< num_bits< T >()<=64, uint64_t, uint128_t > uint64_or_128_t
Definition: format.h:911
fallback_uintptr(const void *p)
Definition: format.h:318
auto operator()(T value) -> unsigned long long
Definition: format.h:2248
auto get_allocator() const -> Allocator
Definition: format.h:757
auto format_to(OutputIt out, const Locale &loc, format_string< T... > fmt, T &&... args) -> OutputIt
Definition: format.h:3085
constexpr auto size() const -> size_t
Definition: core.h:820
auto to_uintptr(const void *p) -> fallback_uintptr
Definition: format.h:333
for p
Definition: process_rx_frame.m:36
basic_memory_buffer< char > memory_buffer
Definition: format.h:802
auto is_supported_floating_point(T) -> uint16_t
Definition: format.h:897
auto thousands_sep_impl(locale_ref loc) -> thousands_sep_result< Char >
Definition: format-inl.h:111
int count_digits< 4 >(detail::fallback_uintptr n)
Definition: format-inl.h:144
void on_hash()
Definition: core.h:2844
auto args() const -> const basic_format_args< basic_format_context > &
Definition: core.h:1777
constexpr auto capacity() const -> size_t
Definition: core.h:823
@ right
Definition: core.h:2021
Definition: format.h:1541
void report_system_error(int error_code, const char *message)
Definition: format-inl.h:2573
void snprintf_float(float, int, float_specs, buffer< char > &)=delete
auto make_write_int_arg(T value, sign_t sign) -> write_int_arg< uint32_or_64_or_128_t< T >>
Definition: format.h:1547
basic_memory_buffer(basic_memory_buffer &&other)
Definition: format.h:738
constexpr auto size() const -> size_t
Definition: core.h:495
const wchar_t & const_reference
Definition: core.h:808
bool_constant< is_integral< T >::value &&!std::is_same< T, bool >::value &&!std::is_same< T, char >::value &&!std::is_same< T, wchar_t >::value > is_integer
Definition: format.h:2241
void append(const U *begin, const U *end)
Sentinel end
Definition: format.h:2774
#define FMT_USE_FLOAT
Definition: core.h:205
void swap(nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType > &j1, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType > &j2) noexcept(//NOLINT(readability-inconsistent-declaration-parameter-name) is_nothrow_move_constructible< nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType > >::value &&//NOLINT(misc-redundant-expression) is_nothrow_move_assignable< nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType > >::value)
exchanges the values of two JSON objects
Definition: json.hpp:24114
void advance_to(iterator it)
Definition: core.h:1788
Definition: format.h:2243
auto is_big_endian() -> bool
Definition: format.h:298
auto code_point_index(basic_string_view< char8_type > s, size_t n) -> size_t
Definition: format.h:609
typename float_info< T >::carrier_uint significand_type
Definition: format.h:1258
auto check_cstring_type_spec(presentation_type type, ErrorHandler &&eh={}) -> bool
Definition: core.h:2793
std::string::const_iterator group
Definition: format.h:1453
T store_[SIZE]
Definition: format.h:679
count
Definition: inspect_agora_results.m:96
type
Definition: core.h:2025
auto check_char_specs(const basic_format_specs< Char > &specs, ErrorHandler &&eh={}) -> bool
Definition: core.h:2717
Allocator alloc_
Definition: format.h:682
ErrorHandler & handler_
Definition: format.h:2280
constexpr auto max_value() -> T
Definition: format.h:340
UInt abs_value
Definition: format.h:1542
auto get_dynamic_spec(FormatArg arg, ErrorHandler eh) -> int
Definition: format.h:2285
constexpr auto digits10< uint128_t >() -> int
Definition: format.h:1048
constexpr Out apply(Out out, basic_string_view< C >) const
Definition: format.h:1921
auto size() const -> size_t
Definition: format.h:1195
auto is_negative(T value) -> bool
Definition: format.h:888
auto to_decimal(T x) -> decimal_fp< T >
Definition: format-inl.h:2088
GeneratorWrapper< T > range(T const &start, T const &end, T const &step)
Definition: catch.hpp:4693
index
Definition: parse_all_dl.m:11
void try_reserve(size_t new_capacity)
Definition: core.h:845
Definition: format-inl.h:237
auto do_write_float(OutputIt out, const DecimalFP &fp, const basic_format_specs< Char > &specs, float_specs fspecs, locale_ref loc) -> OutputIt
Definition: format.h:1806
auto equal2(const char *lhs, const char *rhs) -> bool
Definition: format.h:1082
auto utf8_decode(const char *s, uint32_t *c, int *e) -> const char *
Definition: format.h:491
arg_id_kind kind
Definition: core.h:2120
template auto format_float< long double >(long double value, int precision, float_specs specs, buffer< char > &buf) -> int
uint64_t carrier_uint
Definition: format.h:1232
#define FMT_BUFFER_CONTEXT(Char)
Definition: core.h:1801
Definition: format.h:1452
Definition: format.h:1448
Definition: format.h:1912
constexpr auto compile_string_to_view(detail::std_string_view< Char > s) -> basic_string_view< Char >
Definition: format.h:868
constexpr auto reserve(Iterator &it, size_t) -> Iterator &
Definition: format.h:413
template auto thousands_sep_impl< char >(locale_ref) -> thousands_sep_result< char >
significand_type significand
Definition: format.h:1259
It begin
Definition: format.h:2773
#define FMT_ENABLE_IF(...)
Definition: core.h:344
auto next_arg_id() -> int
Definition: core.h:671
auto write_nonfinite(OutputIt out, bool isinf, basic_format_specs< Char > specs, const float_specs &fspecs) -> OutputIt
Definition: format.h:1682
void check_pointer_type_spec(presentation_type type, ErrorHandler &&eh)
Definition: core.h:2809
uint32_t carrier_uint
Definition: format.h:1206
constexpr auto num_bits() -> int
Definition: format.h:343
auto fill_n(T *out, Size count, char value) -> T *
Definition: format.h:454
constexpr int count_separators(int) const
Definition: format.h:1918
auto get_arg(Context &ctx, ID id) -> typename Context::format_arg
Definition: format.h:2292
size_t padding
Definition: format.h:1402
auto ptr(const std::shared_ptr< T > &p) -> const void *
Definition: format.h:2687
auto join(Range &&range, string_view sep) -> join_view< detail::iterator_t< Range >, detail::sentinel_t< Range >>
Definition: format.h:2865
#define FMT_NOEXCEPT
Definition: core.h:164
auto vformat_to(OutputIt out, const Locale &loc, string_view fmt, format_args args) -> OutputIt
Definition: format.h:3074
Definition: format.h:1257
Definition: format.h:2772
Definition: format.h:1188
std::system_error vsystem_error(int error_code, string_view format_str, format_args args)
Definition: format-inl.h:136
auto count_digits(uint32_t n) -> int
Definition: format.h:1033
template auto snprintf_float< double >(double value, int precision, float_specs specs, buffer< char > &buf) -> int
auto write_exponent(int exp, It it) -> It
Definition: format.h:1277
std::string grouping
Definition: format.h:1053
void resize(size_t count)
Definition: format.h:763
std::integral_constant< bool, B > bool_constant
Definition: core.h:324
constexpr auto begin() const -> iterator
Definition: core.h:651
uint8_t data_[]
Definition: radio_socket.cc:21
unsigned prefix
Definition: format.h:1543
uint16_t len
Definition: eth_common.h:62
digit_grouping(thousands_sep_result< Char > sep)
Definition: format.h:1476
remove_reference_t< decltype(reserve(std::declval< OutputIt & >(), 0))> reserve_iterator
Definition: format.h:419
void on_dynamic_precision(Id arg_id)
Definition: format.h:2333
void on_error(const char *message)
Definition: format-inl.h:2580
for i
Definition: generate_data.m:107
#define FMT_END_NAMESPACE
Definition: core.h:240
#define FMT_NODISCARD
Definition: core.h:200
int pos
Definition: format.h:1454
j template void())
Definition: json.hpp:4744
auto locale() -> detail::locale_ref
Definition: core.h:1792
auto get_container(std::back_insert_iterator< Container > it) -> Container &
Definition: core.h:745
void report_error(format_func func, int error_code, const char *message)
Definition: format-inl.h:83
auto bit_cast(const From &from) -> To
Definition: format.h:288
Definition: format.h:2300
Plot Rx waveform for u
Definition: inspect_single_frame.m:108
A range type with an inclusive start bound and an exclusive end bound.
Definition: utils.h:146
template auto format_float< double >(double value, int precision, float_specs specs, buffer< char > &buf) -> int
constexpr auto const_check(T value) -> T
Definition: core.h:365
auto write_bytes(OutputIt out, string_view bytes, const basic_format_specs< Char > &specs) -> OutputIt
Definition: format.h:1356
auto make_args_checked(const S &fmt, const remove_reference_t< Args > &... args) -> format_arg_store< buffer_context< Char >, remove_reference_t< Args >... >
Definition: format.h:835
constexpr uint32_t invalid_code_point
Definition: format.h:523
ErrorHandler & handler_
Definition: format.h:2260
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
Definition: core.h:1887
uint16_t check
Definition: eth_common.h:69
end start
Definition: inspect_agora_results.m:95
auto get_arg(auto_id) -> format_arg
Definition: format.h:2308
constexpr auto write_padded(OutputIt out, const basic_format_specs< Char > &specs, size_t size, F &&f) -> OutputIt
Definition: format.h:1350
size_t size
Definition: format.h:1401
buffer_context< Char > & context_
Definition: format.h:2303
constexpr auto make_format_args(Args &&... args) -> format_arg_store< Context, remove_cvref_t< Args >... >
Definition: core.h:1870
auto write_int(OutputIt out, write_int_arg< T > arg, const basic_format_specs< Char > &specs, locale_ref loc) -> OutputIt
Definition: format.h:1563
#define FMT_CONSTEXPR_CHAR_TRAITS
Definition: core.h:135
char8_type
Definition: format.h:465
@ numeric
Definition: core.h:2021
precision_checker(ErrorHandler &eh)
Definition: format.h:2265
next_state initial_state() const
Definition: format.h:1456
auto end() -> T *
Definition: core.h:814
Definition: format-inl.h:224
Char thousands_sep
Definition: format.h:1054
int exponent
Definition: format.h:1704
const char * significand
Definition: format.h:1702
void append(const ContiguousRange &range)
Definition: format.h:771
constexpr auto digits10() -> int
Definition: format.h:1042
type
Definition: core.h:2021
auto map(signed char val) -> int
Definition: core.h:1301
int128_t
Definition: core.h:414
width_checker(ErrorHandler &eh)
Definition: format.h:2245
void text(Numeric x, Numeric y, const std::string &s="")
Definition: matplotlibcpp.h:1834
auto fill(OutputIt it, size_t n, const fill_t< Char > &fill) -> OutputIt
Definition: format.h:1315
int next(next_state &state) const
Definition: format.h:1459
auto write_int_noinline(OutputIt out, write_int_arg< T > arg, const basic_format_specs< Char > &specs, locale_ref loc) -> OutputIt
Definition: format.h:1624
int count_separators(int num_digits) const
Definition: format.h:1480
constexpr auto digits10< int128_t >() -> int
Definition: format.h:1045
bool signbit(T value)
Definition: format.h:1970
for d
Definition: process_rx_frame.m:53
T * checked_ptr
Definition: format.h:384
auto data() -> T *
Definition: core.h:826
Definition: format.h:1203
void(*)(detail::buffer< char > &, int, const char *) format_func
Definition: format.h:2441
constexpr auto num_bits< fallback_uintptr >() -> int
Definition: format.h:349
auto get_significand_size(const dragonbox::decimal_fp< T > &fp) -> int
Definition: format.h:1711
#define FMT_ASSERT(condition, message)
Definition: core.h:378
auto copy_str_noinline(InputIt begin, InputIt end, OutputIt out) -> OutputIt
Definition: format.h:469
constexpr auto num_bits< uint128_t >() -> int
Definition: format.h:348
constexpr auto is_constant_evaluated(bool default_value=false) -> bool
Definition: core.h:354
#define FMT_BEGIN_DETAIL_NAMESPACE
Definition: core.h:249
constexpr auto base_iterator(Iterator, Iterator it) -> Iterator
Definition: format.h:441
auto system_error(int error_code, format_string< T... > fmt, T &&... args) -> std::system_error
Definition: format.h:2471
auto format_decimal(Iterator out, UInt value, int size) -> format_decimal_result< Iterator >
Definition: format.h:1130
#define FMT_MODULE_EXPORT_END
Definition: core.h:248
auto arg_id(basic_string_view< char_type > name) -> int
Definition: core.h:1774
auto count_digits_fallback(T n) -> int
Definition: format.h:936
void on_align(align_t align)
Definition: core.h:2830
Definition: format.h:1052
basic_string_view< Char > name
Definition: core.h:2126
Definition: format.h:1400
typename std::conditional< B, T, F >::type conditional_t
Definition: core.h:323
Definition: json.hpp:5213
auto write_significand(OutputIt out, T significand, int significand_size, int integral_size, Char decimal_point, const Grouping &grouping) -> OutputIt
Definition: format.h:1787
void for_each_codepoint(string_view s, F f)
Definition: format.h:528
void advance_to(iterator it)
Definition: core.h:663
Definition: bin_to_hex.h:102
auto vformat(const Locale &loc, string_view fmt, format_args args) -> std::string
Definition: format.h:3051
void set(T *buf_data, size_t buf_capacity)
Definition: core.h:798
constexpr fallback_digit_grouping(locale_ref, bool)
Definition: format.h:1914
void prefix_append(unsigned &prefix, unsigned value)
Definition: format.h:1536
Definition: format.h:2691
@ none
Definition: core.h:2021
auto write_float(OutputIt out, const DecimalFP &fp, const basic_format_specs< Char > &specs, float_specs fspecs, locale_ref loc) -> OutputIt
Definition: format.h:1927
#define FMT_BEGIN_NAMESPACE
Definition: core.h:237
std::string to_string() const
Definition: eth_common.h:64
auto error_handler() -> detail::error_handler
Definition: core.h:1781
uint16_t id
Definition: eth_common.h:65
typename type_identity< T >::type type_identity_t
Definition: core.h:332
template auto thousands_sep_impl< wchar_t >(locale_ref) -> thousands_sep_result< wchar_t >
decltype(std::end(std::declval< T & >())) sentinel_t
Definition: format.h:364
#define FMT_DEPRECATED
Definition: core.h:231
void check_string_type_spec(presentation_type type, ErrorHandler &&eh={})
Definition: core.h:2802
typename std::enable_if< B, T >::type enable_if_t
Definition: core.h:321
constexpr auto promote_float(float value) -> double
Definition: format.h:1310
auto visit_format_arg(Visitor &&vis, const basic_format_arg< Context > &arg) -> decltype(vis(0))
Definition: core.h:1587
auto get_iterator(Buffer &buf) -> decltype(buf.out())
Definition: core.h:1032
void format_system_error(detail::buffer< char > &out, int error_code, const char *message)
Definition: format-inl.h:2562
auto operator()(T) -> unsigned long long
Definition: format.h:2254
auto get_arg(int arg_id) -> format_arg
Definition: format.h:2312
std::integral_constant< bool, std::numeric_limits< T >::is_signed||std::is_same< T, int128_t >::value > is_signed
Definition: format.h:883
auto get_data(Container &c) -> typename Container::value_type *
Definition: format.h:372
auto operator()(T) -> unsigned long long
Definition: format.h:2274
void handle_dynamic_spec(int &value, arg_ref< typename Context::char_type > ref, Context &ctx)
Definition: format.h:2342
basic_format_parse_context< Char > & parse_context_
Definition: format.h:2302
uint128_t
Definition: core.h:415
void try_resize(size_t count)
Definition: core.h:836
template auto snprintf_float< long double >(long double value, int precision, float_specs specs, buffer< char > &buf) -> int
auto get_arg(basic_string_view< Char > arg_id) -> format_arg
Definition: format.h:2317
T value
Definition: format.h:2726
specs_handler(basic_format_specs< Char > &specs, basic_format_parse_context< Char > &parse_ctx, buffer_context< Char > &ctx)
Definition: format.h:2323
typename std::remove_reference< T >::type remove_reference_t
Definition: core.h:326
void throw_format_error(const char *message)
Definition: format-inl.h:43
write_int_data(int num_digits, unsigned prefix, const basic_format_specs< Char > &specs)
Definition: format.h:1404
auto operator=(basic_memory_buffer &&other) -> basic_memory_buffer &
Definition: format.h:748
void move(basic_memory_buffer &other)
Definition: format.h:709
conditional_t< std::is_same< T, char >::value, appender, std::back_insert_iterator< buffer< T > >> buffer_appender
Definition: core.h:1023
#define FMT_END_DETAIL_NAMESPACE
Definition: core.h:250
void format_error_code(detail::buffer< char > &out, int error_code, string_view message)
Definition: format-inl.h:60
auto parse_float_type_spec(const basic_format_specs< Char > &specs, ErrorHandler &&eh={}) -> float_specs
Definition: core.h:2749
constexpr auto make_checked(T *p, size_t) -> T *
Definition: format.h:385
auto to_unsigned(Int value) -> typename std::make_unsigned< Int >::type
Definition: core.h:424
Char separator() const
Definition: format.h:1478
auto compute_width(basic_string_view< char8_type > s) -> size_t
Definition: format.h:597
basic_memory_buffer< wchar_t > buffer_
Definition: format.h:1190
void copy2(Char *dst, const char *src)
Definition: format.h:1088
digit_grouping(locale_ref loc, bool localized=true)
Definition: format.h:1470
auto write_int_localized(OutputIt &out, UInt value, unsigned prefix, const basic_format_specs< Char > &specs, locale_ref loc) -> bool
Definition: format.h:1528
#define FMT_CONSTEXPR20
Definition: core.h:119
thousands_sep_result< Char > sep_
Definition: format.h:1450
void reserve(size_t new_capacity)
Definition: format.h:766
auto operator()(T value) -> unsigned long long
Definition: format.h:2268
typename std::remove_cv< remove_reference_t< T > >::type remove_cvref_t
Definition: core.h:330
auto decimal_point(locale_ref loc) -> wchar_t
Definition: format.h:1074
#define FMT_CONSTEXPR
Definition: core.h:110
auto format_uint(It out, UInt value, int num_digits, bool upper=false) -> It
Definition: format.h:1175
result
Definition: format-inl.h:640
Definition: format.h:2726
bool isfinite(T)
Definition: chrono.h:1400
type
Definition: core.h:1131
Definition: format.h:1701
auto parse_format_specs(const Char *begin, const Char *end, SpecHandler &&handler) -> const Char *
Definition: core.h:2499
constexpr auto num_bits< int128_t >() -> int
Definition: format.h:347
precision
Definition: inspect_single_frame.m:150