20#define FMT_VERSION 90100
22#if defined(__clang__) && !defined(__ibmxl__)
23#define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__)
25#define FMT_CLANG_VERSION 0
28#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && \
29 !defined(__NVCOMPILER)
30#define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
32#define FMT_GCC_VERSION 0
37#if FMT_GCC_VERSION >= 504
38#define FMT_GCC_PRAGMA(arg) _Pragma(arg)
40#define FMT_GCC_PRAGMA(arg)
45#define FMT_ICC_VERSION __ICL
46#elif defined(__INTEL_COMPILER)
47#define FMT_ICC_VERSION __INTEL_COMPILER
49#define FMT_ICC_VERSION 0
53#define FMT_MSC_VERSION _MSC_VER
54#define FMT_MSC_WARNING(...) __pragma(warning(__VA_ARGS__))
56#define FMT_MSC_VERSION 0
57#define FMT_MSC_WARNING(...)
61#define FMT_CPLUSPLUS _MSVC_LANG
63#define FMT_CPLUSPLUS __cplusplus
67#define FMT_HAS_FEATURE(x) __has_feature(x)
69#define FMT_HAS_FEATURE(x) 0
72#if (defined(__has_include) || FMT_ICC_VERSION >= 1600 || \
73 FMT_MSC_VERSION > 1900) && \
74 !defined(__INTELLISENSE__)
75#define FMT_HAS_INCLUDE(x) __has_include(x)
77#define FMT_HAS_INCLUDE(x) 0
80#ifdef __has_cpp_attribute
81#define FMT_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)
83#define FMT_HAS_CPP_ATTRIBUTE(x) 0
86#define FMT_HAS_CPP14_ATTRIBUTE(attribute) \
87 (FMT_CPLUSPLUS >= 201402L && FMT_HAS_CPP_ATTRIBUTE(attribute))
89#define FMT_HAS_CPP17_ATTRIBUTE(attribute) \
90 (FMT_CPLUSPLUS >= 201703L && FMT_HAS_CPP_ATTRIBUTE(attribute))
94#ifndef FMT_USE_CONSTEXPR
95#if (FMT_HAS_FEATURE(cxx_relaxed_constexpr) || FMT_MSC_VERSION >= 1912 || \
96 (FMT_GCC_VERSION >= 600 && FMT_CPLUSPLUS >= 201402L)) && \
97 !FMT_ICC_VERSION && !defined(__NVCC__)
98#define FMT_USE_CONSTEXPR 1
100#define FMT_USE_CONSTEXPR 0
104#define FMT_CONSTEXPR constexpr
109#if ((FMT_CPLUSPLUS >= 202002L) && \
110 (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE > 9)) || \
111 (FMT_CPLUSPLUS >= 201709L && FMT_GCC_VERSION >= 1002)
112#define FMT_CONSTEXPR20 constexpr
114#define FMT_CONSTEXPR20
118#if defined(__GLIBCXX__)
119#if FMT_CPLUSPLUS >= 201703L && defined(_GLIBCXX_RELEASE) && \
120 _GLIBCXX_RELEASE >= 7
121#define FMT_CONSTEXPR_CHAR_TRAITS constexpr
123#elif defined(_LIBCPP_VERSION) && FMT_CPLUSPLUS >= 201703L && \
124 _LIBCPP_VERSION >= 4000
125#define FMT_CONSTEXPR_CHAR_TRAITS constexpr
126#elif FMT_MSC_VERSION >= 1914 && FMT_CPLUSPLUS >= 201703L
127#define FMT_CONSTEXPR_CHAR_TRAITS constexpr
129#ifndef FMT_CONSTEXPR_CHAR_TRAITS
130#define FMT_CONSTEXPR_CHAR_TRAITS
134#ifndef FMT_EXCEPTIONS
135#if (defined(__GNUC__) && !defined(__EXCEPTIONS)) || \
136 (FMT_MSC_VERSION && !_HAS_EXCEPTIONS)
137#define FMT_EXCEPTIONS 0
139#define FMT_EXCEPTIONS 1
143#ifndef FMT_DEPRECATED
144#if FMT_HAS_CPP14_ATTRIBUTE(deprecated) || FMT_MSC_VERSION >= 1900
145#define FMT_DEPRECATED [[deprecated]]
147#if (defined(__GNUC__) && !defined(__LCC__)) || defined(__clang__)
148#define FMT_DEPRECATED __attribute__((deprecated))
150#define FMT_DEPRECATED __declspec(deprecated)
152#define FMT_DEPRECATED
159#if FMT_EXCEPTIONS && FMT_HAS_CPP_ATTRIBUTE(noreturn) && !FMT_MSC_VERSION && \
161#define FMT_NORETURN [[noreturn]]
166#if FMT_HAS_CPP17_ATTRIBUTE(fallthrough)
167#define FMT_FALLTHROUGH [[fallthrough]]
168#elif defined(__clang__)
169#define FMT_FALLTHROUGH [[clang::fallthrough]]
170#elif FMT_GCC_VERSION >= 700 && \
171 (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 520)
172#define FMT_FALLTHROUGH [[gnu::fallthrough]]
174#define FMT_FALLTHROUGH
178#if FMT_HAS_CPP17_ATTRIBUTE(nodiscard)
179#define FMT_NODISCARD [[nodiscard]]
186#define FMT_USE_FLOAT 1
188#ifndef FMT_USE_DOUBLE
189#define FMT_USE_DOUBLE 1
191#ifndef FMT_USE_LONG_DOUBLE
192#define FMT_USE_LONG_DOUBLE 1
196#if FMT_GCC_VERSION || FMT_CLANG_VERSION
197#define FMT_INLINE inline __attribute__((always_inline))
199#define FMT_INLINE inline
204#define FMT_FORWARD(...) static_cast<decltype(__VA_ARGS__)&&>(__VA_ARGS__)
207#define FMT_UNCHECKED_ITERATOR(It) \
208 using _Unchecked_type = It
210#define FMT_UNCHECKED_ITERATOR(It) using unchecked_type = It
213#ifndef FMT_BEGIN_NAMESPACE
214#define FMT_BEGIN_NAMESPACE \
217 inline namespace v9 \
219#define FMT_END_NAMESPACE \
224#ifndef FMT_MODULE_EXPORT
225#define FMT_MODULE_EXPORT
226#define FMT_MODULE_EXPORT_BEGIN
227#define FMT_MODULE_EXPORT_END
228#define FMT_BEGIN_DETAIL_NAMESPACE \
231#define FMT_END_DETAIL_NAMESPACE }
234#if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
235#define FMT_CLASS_API FMT_MSC_WARNING(suppress : 4275)
237#define FMT_API __declspec(dllexport)
238#elif defined(FMT_SHARED)
239#define FMT_API __declspec(dllimport)
243#if defined(FMT_EXPORT) || defined(FMT_SHARED)
244#if defined(__GNUC__) || defined(__clang__)
245#define FMT_API __attribute__((visibility("default")))
254#if FMT_HAS_INCLUDE(<string_view>) && \
255 (FMT_CPLUSPLUS >= 201703L || defined(_LIBCPP_VERSION))
256#include <string_view>
257#define FMT_USE_STRING_VIEW
258#elif FMT_HAS_INCLUDE("experimental/string_view") && FMT_CPLUSPLUS >= 201402L
259#include <experimental/string_view>
260#define FMT_USE_EXPERIMENTAL_STRING_VIEW
264#define FMT_UNICODE !FMT_MSC_VERSION
268#if ((FMT_GCC_VERSION >= 1000 || FMT_CLANG_VERSION >= 1101) && \
269 FMT_CPLUSPLUS >= 202002L && !defined(__apple_build_version__)) || \
270 (defined(__cpp_consteval) && \
271 (!FMT_MSC_VERSION || _MSC_FULL_VER >= 193030704))
273#define FMT_CONSTEVAL consteval
274#define FMT_HAS_CONSTEVAL
280#ifndef FMT_USE_NONTYPE_TEMPLATE_ARGS
281#if defined(__cpp_nontype_template_args) && \
282 ((FMT_GCC_VERSION >= 903 && FMT_CPLUSPLUS >= 201709L) || \
283 __cpp_nontype_template_args >= 201911L) && \
284 !defined(__NVCOMPILER)
285#define FMT_USE_NONTYPE_TEMPLATE_ARGS 1
287#define FMT_USE_NONTYPE_TEMPLATE_ARGS 0
293#if !defined(__OPTIMIZE__) && !defined(__NVCOMPILER)
301template <
bool B,
typename T =
void>
303template <
bool B,
typename T,
typename F>
323template <
typename...>
331template <
typename P1,
typename... Pn>
337template <
typename...>
345template <
typename P1,
typename... Pn>
362#define FMT_ENABLE_IF(...)
364#define FMT_ENABLE_IF(...) enable_if_t<(__VA_ARGS__), int> = 0
372template <
typename... T>
378 bool default_value =
false) noexcept ->
bool
380#ifdef __cpp_lib_is_constant_evaluated
382 return std::is_constant_evaluated();
384 return default_value;
400#define FMT_ASSERT(condition, message) \
401 ::fmt::detail::ignore_unused((condition), (message))
403#define FMT_ASSERT(condition, message) \
406 : ::fmt::detail::assert_fail(__FILE__, __LINE__, (message)))
410#if defined(FMT_USE_STRING_VIEW)
411template <
typename Char>
413#elif defined(FMT_USE_EXPERIMENTAL_STRING_VIEW)
414template <
typename Char>
425#elif defined(__SIZEOF_INT128__) && !defined(__NVCC__) && \
426 !(FMT_CLANG_VERSION && FMT_MSC_VERSION)
427#define FMT_USE_INT128 1
436#define FMT_USE_INT128 0
454template <
typename Int>
456 typename std::make_unsigned<Int>::type
458 FMT_ASSERT(std::is_unsigned<Int>::value ||
value >= 0,
"negative value");
459 return static_cast<typename std::make_unsigned<Int>::type
>(
value);
463constexpr unsigned char
micro[] =
"\u00B5";
468 using uchar =
unsigned char;
470 uchar(
micro[1]) == 0xB5);
481template <
typename Char>
515 ?
std::strlen(reinterpret_cast<const char*>(
s))
516 :
std::char_traits<Char>::length(
s))
521 template <
typename Traits,
typename Alloc>
523 const std::basic_string<Char, Traits, Alloc>&
s) noexcept
528 template <
typename S, FMT_ENABLE_IF(std::is_same<S, detail::std_
string_view<Char>>::value)>
535 constexpr auto data() const noexcept -> const Char*
541 constexpr auto size() const noexcept ->
size_t
555 constexpr auto operator[](
size_t pos)
const noexcept ->
const Char&
569 size_t str_size =
size_ < other.size_ ?
size_ : other.size_;
570 int result = std::char_traits<Char>::compare(
data_, other.data_, str_size);
572 result =
size_ == other.size_ ? 0 : (
size_ < other.size_ ? -1 : 1);
580 return lhs.compare(rhs) == 0;
584 return lhs.compare(rhs) != 0;
588 return lhs.compare(rhs) < 0;
592 return lhs.compare(rhs) <= 0;
596 return lhs.compare(rhs) > 0;
600 return lhs.compare(rhs) >= 0;
629template <
typename Char, FMT_ENABLE_IF(is_
char<Char>::value)>
634template <
typename Char,
typename Traits,
typename Alloc>
640template <
typename Char>
646template <
typename Char,
652template <
typename S, FMT_ENABLE_IF(is_compile_
string<S>::value)>
665struct is_string : std::is_class<decltype(to_string_view(std::declval<S>()))>
669template <
typename S,
typename =
void>
677 using type =
typename result::value_type;
705template <
typename T,
typename Char>
710#define FMT_TYPE_CONSTANT(Type, constant) \
711 template <typename Char> \
712 struct type_constant<Type, Char> \
713 : std::integral_constant<type, type::constant> \
759using char_t =
typename detail::char_t_impl<S>::type;
768template <
typename Char,
typename ErrorHandler = detail::error_handler>
818 on_error(
"cannot switch from manual to automatic argument indexing");
834 on_error(
"cannot switch from automatic to manual argument indexing");
847 ErrorHandler::on_error(message);
860template <
typename Char,
typename ErrorHandler = detail::error_handler>
889 this->
on_error(
"argument not found");
897 this->
on_error(
"argument not found");
904 this->
on_error(
"width/precision is not integer");
909template <
typename Char,
typename ErrorHandler>
917 using context = detail::compile_parse_context<Char, ErrorHandler>;
918 if (
id >=
static_cast<context*
>(
this)->num_args())
919 on_error(
"argument not found");
923template <
typename Char,
typename ErrorHandler>
927 if (detail::is_constant_evaluated())
929 using context = detail::compile_parse_context<Char, ErrorHandler>;
930 static_cast<context*
>(
this)->check_dynamic_spec(arg_id);
934template <
typename Context>
936template <
typename Context>
938template <
typename Context>
942template <
typename T,
typename Char =
char,
typename Enable =
void>
951template <
typename T,
typename Context>
953 std::is_constructible<typename Context::template formatter_type<T>>;
960template <
typename Char>
969template <
typename Context,
typename T>
971 ->
decltype(
typename Context::template formatter_type<T>().format(
972 std::declval<const T&>(), std::declval<Context&>()),
977template <
typename Context>
982template <
typename T,
typename Context>
985 return has_const_formatter_impl<Context>(
static_cast<T*
>(
nullptr));
989template <
typename Container>
993 using base = std::back_insert_iterator<Container>;
994 struct accessor :
base
1000 using base::container;
1002 return *accessor(it).container;
1005template <
typename Char,
typename InputIt,
typename OutputIt>
1009 while (begin != end)
1010 *
out++ =
static_cast<Char
>(*begin++);
1014template <
typename Char,
typename T,
typename U, FMT_ENABLE_IF(std::is_same<remove_const_t<T>, U>::value&& is_
char<U>::value)>
1018 return copy_str<Char, T*, U*>(begin, end,
out);
1020 memcpy(
out, begin, size *
sizeof(U));
1030template <
typename T>
1084 auto end() const noexcept -> const T*
1090 constexpr auto size() const noexcept ->
size_t
1144 template <
typename U>
1147 template <
typename Idx>
1152 template <
typename Idx>
1193 return size < n ? size : n;
1198template <
typename OutputIt,
typename T,
typename Traits = buffer_traits>
1244 return Traits::count() + this->
size();
1248template <
typename T>
1271 if (this->
data() == out_)
1289 if (this->
data() != out_)
1311template <
typename T>
1327 return &*this->
end();
1332template <
typename Container>
1335 typename Container::value_type>>
1336 final :
public buffer<typename Container::value_type>
1358 auto out() -> std::back_insert_iterator<Container>
1360 return std::back_inserter(container_);
1365template <
typename T =
char>
1381 count_ += this->
size();
1397template <
typename T>
1401template <
typename T,
typename OutputIt>
1407template <
typename Buffer>
1412template <
typename T>
1418template <
typename T,
typename Char =
char,
typename Enable =
void>
1425template <
typename T,
typename Char>
1427#ifdef FMT_DEPRECATED_OSTREAM
1428 std::is_constructible<fallback_formatter<T, Char>>;
1437template <
typename Char,
typename T>
1448template <
typename Char>
1455template <
typename T,
typename Char,
size_t NUM_ARGS,
size_t NUM_NAMED_ARGS>
1460 T
args_[1 + (NUM_ARGS != 0 ? NUM_ARGS : +1)];
1463 template <
typename... U>
1479template <
typename T,
typename Char,
size_t NUM_ARGS>
1485 template <
typename... U>
1500template <
typename Char>
1505template <
typename T>
1509template <
typename T>
1514template <
typename T,
typename Char>
1528 named_args[named_arg_count++] = {
arg.
name, arg_count};
1532template <
typename... Args>
1537template <
bool B = false>
1542template <
bool B1,
bool B2,
bool... Tail>
1545 return (B1 ? 1 : 0) + count<B2, Tail...>();
1548template <
typename... Args>
1551 return count<is_named_arg<Args>::value...>();
1554template <
typename... Args>
1557 return count<is_statically_named_arg<Args>::value...>();
1573template <
typename Char>
1580template <
typename Char>
1587template <
typename Context>
1596template <
typename Context>
1677 string.data = val.
data();
1678 string.size = val.
size();
1689 template <
typename T>
1693 custom.value =
const_cast<value_type*
>(&val);
1700 typename Context::template formatter_type<value_type>,
1710 template <
typename T,
typename Formatter>
1712 typename Context::parse_context_type& parse_ctx,
1715 auto f = Formatter();
1716 parse_ctx.advance_to(f.parse(parse_ctx));
1717 using qualified_type =
1719 ctx.advance_to(f.format(*
static_cast<qualified_type*
>(
arg), ctx));
1723template <
typename Context,
typename T>
1735#ifdef __cpp_lib_byte
1736inline auto format_as(std::byte
b) ->
unsigned char
1738 return static_cast<unsigned char>(
b);
1742template <
typename T>
1745 template <
typename U,
typename V = decltype(format_as(U())), FMT_ENABLE_IF(std::is_enum<U>::value&& std::is_
integral<V>::value)>
1746 static auto check(U*) -> std::true_type;
1747 static auto check(...) -> std::false_type;
1758template <
typename Context>
1800 ->
unsigned long long
1817 template <
typename T, FMT_ENABLE_IF(std::is_same<T,
char>::value || std::is_same<T,
char_type>::value)>
1822 template <
typename T, enable_if_t<(std::is_same<T,
wchar_t>::value ||
1824 std::is_same<T,
char8_t>::value ||
1826 std::is_same<T,
char16_t>::value || std::is_same<T,
char32_t>::value) &&
1827 !std::is_same<T,
char_type>::value,
1855 template <
typename T,
1863 template <
typename T,
1870 template <
typename T,
1880 template <
typename T,
1910 std::is_pointer<T>::value || std::is_member_pointer<T>::value ||
1911 std::is_function<
typename std::remove_pointer<T>::type>
::value ||
1912 (std::is_convertible<const T&, const void*>::value &&
1913 !std::is_convertible<const T&, const char_type*>::value &&
1920 template <
typename T, std::
size_t N, FMT_ENABLE_IF(!std::is_same<T,
wchar_t>::value)>
1926 template <
typename T,
1928 std::is_enum<T>::value&& std::is_convertible<T, int>::value &&
1932 ->
decltype(std::declval<arg_mapper>().map(
1938 template <
typename T, FMT_ENABLE_IF(has_format_as<T>::value && !has_formatter<T, Context>::value)>
1940 ->
decltype(std::declval<arg_mapper>().map(format_as(T())))
1942 return map(format_as(val));
1945 template <
typename T,
typename U = remove_cvref_t<T>>
1948 !std::is_const<remove_reference_t<T>>::value ||
1949 has_fallback_formatter<U, char_type>::value>
1953#if (FMT_MSC_VERSION != 0 && FMT_MSC_VERSION < 1910) || \
1954 FMT_ICC_VERSION != 0 || defined(__NVCC__)
1956 template <
typename T>
1962 template <
typename T, FMT_ENABLE_IF(formattable<T>::value)>
1967 template <
typename T, FMT_ENABLE_IF(!formattable<T>::value)>
1974 template <
typename T,
typename U = remove_cvref_t<T>, FMT_ENABLE_IF(!is_
string<U>::value && !is_
char<U>::value && !std::is_array<U>::value && !std::is_po
inter<U>::value && !has_format_as<U>::value && (has_formatter<U, Context>::value || has_fallback_formatter<U,
char_type>::value))>
1976 ->
decltype(this->
do_map(std::forward<T>(val)))
1978 return do_map(std::forward<T>(val));
1981 template <
typename T, FMT_ENABLE_IF(is_named_arg<T>::value)>
1995template <
typename T,
typename Context>
1998 typename Context::char_type>;
2009enum :
unsigned long long
2013enum :
unsigned long long
2022class appender :
public std::back_insert_iterator<detail::buffer<char>>
2024 using base = std::back_insert_iterator<detail::buffer<char>>;
2026 template <
typename T>
2029 return detail::get_container(
out);
2033 using std::back_insert_iterator<detail::buffer<char>>::back_insert_iterator;
2052template <
typename Context>
2059 template <
typename ContextType,
typename T>
2063 template <
typename Visitor,
typename Ctx>
2066 ->
decltype(vis(0));
2073 template <
typename T,
typename Char,
size_t NUM_ARGS,
size_t NUM_NAMED_ARGS>
2085 explicit handle(detail::custom_value<Context> custom)
2090 void format(
typename Context::parse_context_type& parse_ctx,
2105 constexpr explicit operator bool() const noexcept
2107 return type_ != detail::type::none_type;
2117 return detail::is_integral_type(
type_);
2121 return detail::is_arithmetic_type(
type_);
2132template <
typename Visitor,
typename Context>
2138 case detail::type::none_type:
2140 case detail::type::int_type:
2141 return vis(
arg.value_.int_value);
2142 case detail::type::uint_type:
2143 return vis(
arg.value_.uint_value);
2144 case detail::type::long_long_type:
2145 return vis(
arg.value_.long_long_value);
2146 case detail::type::ulong_long_type:
2147 return vis(
arg.value_.ulong_long_value);
2148 case detail::type::int128_type:
2149 return vis(detail::convert_for_visit(
arg.value_.int128_value));
2150 case detail::type::uint128_type:
2151 return vis(detail::convert_for_visit(
arg.value_.uint128_value));
2152 case detail::type::bool_type:
2153 return vis(
arg.value_.bool_value);
2154 case detail::type::char_type:
2155 return vis(
arg.value_.char_value);
2156 case detail::type::float_type:
2157 return vis(
arg.value_.float_value);
2158 case detail::type::double_type:
2159 return vis(
arg.value_.double_value);
2160 case detail::type::long_double_type:
2161 return vis(
arg.value_.long_double_value);
2162 case detail::type::cstring_type:
2163 return vis(
arg.value_.string.data);
2164 case detail::type::string_type:
2166 return vis(sv(
arg.value_.string.data,
arg.value_.string.size));
2167 case detail::type::pointer_type:
2168 return vis(
arg.value_.pointer);
2169 case detail::type::custom_type:
2177template <
typename Char,
typename InputIt>
2184template <
typename Char,
typename R,
typename OutputIt>
2187 return detail::copy_str<Char>(rng.begin(), rng.end(),
out);
2190#if FMT_GCC_VERSION && FMT_GCC_VERSION < 500
2192template <
typename... Ts>
2197template <
typename... Ts>
2198using void_t =
typename detail::void_t_impl<Ts...>
::type;
2200template <
typename...>
2204template <
typename It,
typename T,
typename Enable =
void>
2209template <
typename It,
typename T>
2214 decltype(*std::declval<It>() = std::declval<T>())>>
2219template <
typename OutputIt>
2223template <
typename Container>
2229template <
typename OutputIt>
2233template <
typename Container>
2254 template <
typename Locale>
2257 explicit operator bool() const noexcept
2262 template <
typename Locale>
2272template <
typename Context,
typename Arg,
typename... Args>
2279template <
typename Context,
typename T>
2284 constexpr bool formattable_char =
2286 static_assert(formattable_char,
"Mixing character types is disallowed.");
2288 constexpr bool formattable_const =
2290 static_assert(formattable_const,
"Cannot format a const argument.");
2296 constexpr bool formattable_pointer =
2298 static_assert(formattable_pointer,
2299 "Formatting of non-void pointers is disallowed.");
2301 constexpr bool formattable =
2305 "Cannot format an argument. To make type T formattable provide a "
2306 "formatter<T> specialization: https://fmt.dev/latest/api.html#udt");
2310template <
typename Context,
typename T>
2315 arg.value_ = make_value<Context>(
value);
2322template <
bool IS_PACKED,
typename Context, type,
typename T, FMT_ENABLE_IF(IS_PACKED)>
2325 return make_value<Context>(val);
2328template <
bool IS_PACKED,
typename Context, type,
typename T, FMT_ENABLE_IF(!IS_PACKED)>
2331 return make_arg<Context>(
value);
2336template <
typename OutputIt,
typename Char>
2352 template <
typename T>
2364 : out_(
out), args_(ctx_args), loc_(loc)
2370 return args_.
get(
id);
2403 if (!detail::is_back_insert_iterator<iterator>())
2413template <
typename Char>
2419#define FMT_BUFFER_CONTEXT(Char) \
2420 basic_format_context<detail::buffer_appender<Char>, Char>
2422template <
typename T,
typename Char =
char>
2424 !std::is_base_of<detail::unformattable,
2425 decltype(detail::arg_mapper<buffer_context<Char>>().
map(
2426 std::declval<T>()))>
::value &&
2427 !detail::has_fallback_formatter<T, Char>::value>;
2436template <
typename Context,
typename... Args>
2444 static const size_t num_args =
sizeof...(Args);
2445 static const size_t num_named_args = detail::count_named_args<Args...>();
2446 static const bool is_packed = num_args <= detail::max_packed_args;
2450 detail::arg_data<value_type, typename Context::char_type, num_args, num_named_args>
2455 static constexpr unsigned long long desc =
2456 (is_packed ? detail::encode_types<Context, Args...>()
2458 (num_named_args != 0
2463 template <
typename... T>
2475 detail::init_named_args(data_.named_args(), 0, 0, args...);
2505template <
typename Char,
typename T>
2506inline auto arg(
const Char*
name,
const T&
arg) -> detail::named_arg<Char, T>
2508 static_assert(!detail::is_named_arg<T>(),
"nested named arguments");
2522template <
typename Context>
2547 return (desc_ & detail::is_unpacked_bit) == 0;
2551 return (desc_ & detail::has_named_args_bit) != 0;
2556 int shift =
index * detail::packed_arg_bits;
2557 unsigned int mask = (1 << detail::packed_arg_bits) - 1;
2558 return static_cast<detail::type
>((desc_ >> shift) & mask);
2562 const detail::value<Context>* values)
2563 : desc_(
desc), values_(values)
2567 : desc_(
desc), args_(args)
2573 : desc_(0), args_(nullptr)
2582 template <
typename... Args>
2619 if (
id < max_size())
2623 if (
id >= detail::max_packed_args)
2626 if (
arg.type_ == detail::type::none_type)
2628 arg.value_ = values_[id];
2632 template <
typename Char>
2635 int id = get_id(
name);
2639 template <
typename Char>
2642 if (!has_named_args())
2644 const auto& named_args =
2645 (is_packed() ? values_[-1] : args_[-1].value_).named_args;
2646 for (
size_t i = 0;
i < named_args.size; ++
i)
2648 if (named_args.data[
i].name ==
name)
2649 return named_args.data[
i].id;
2656 unsigned long long max_packed = detail::max_packed_args;
2657 return static_cast<int>(is_packed() ? max_packed
2671#if FMT_GCC_VERSION && FMT_GCC_VERSION < 903
2672#define FMT_ENUM_UNDERLYING_TYPE(type)
2674#define FMT_ENUM_UNDERLYING_TYPE(type) : type
2703template <
typename Char>
2711 Char data_[max_size] = {Char(
' '), Char(0), Char(0), Char(0)};
2712 unsigned char size_ = 1;
2717 auto size =
s.size();
2718 if (size > max_size)
2720 for (
size_t i = 0;
i < size; ++
i)
2722 size_ =
static_cast<unsigned char>(size);
2725 constexpr auto size() const ->
size_t
2729 constexpr auto data() const -> const Char*
2736 return data_[
index];
2740 return data_[
index];
2770template <
typename Char>
2806template <
typename Char>
2849template <
typename Char>
2861template <
typename Char>
2874 : specs_(other.specs_)
2901 if (specs_.
align == align::none)
2902 specs_.
align = align::numeric;
2903 specs_.
fill[0] = Char(
'0');
2908 specs_.
width = width;
2926template <
typename ParseContext>
2928 :
public specs_setter<typename ParseContext::char_type>
2941 specs_(other.specs_),
2942 context_(other.context_)
2946 template <
typename Id>
2949 specs_.width_ref = make_arg_ref(arg_id);
2952 template <
typename Id>
2955 specs_.precision_ref = make_arg_ref(arg_id);
2960 context_.on_error(message);
2971 context_.check_arg_id(arg_id);
2972 context_.check_dynamic_spec(arg_id);
2978 int arg_id = context_.next_arg_id();
2979 context_.check_dynamic_spec(arg_id);
2986 context_.check_arg_id(arg_id);
2988 context_.begin(),
to_unsigned(context_.end() - context_.begin()));
2993template <
typename Char>
2996 return (c >=
'a' && c <=
'z') || (c >=
'A' && c <=
'Z');
3000template <
typename Char, FMT_ENABLE_IF(std::is_
integral<Char>::value)>
3005template <
typename Char, FMT_ENABLE_IF(std::is_enum<Char>::value)>
3013 return "\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\0\0\0\0\0\0\0\0\2\2\2\2\3\3\4"
3014 [
static_cast<unsigned char>(c) >> 3];
3017template <
typename Char>
3031template <
bool IS_CONSTEXPR,
typename T,
typename Ptr = const T*>
3045 out =
static_cast<const char*
>(
3047 return out !=
nullptr;
3052template <
typename Char>
3055 FMT_ASSERT(begin != end &&
'0' <= *begin && *begin <=
'9',
"");
3056 unsigned value = 0, prev = 0;
3063 }
while (
p != end &&
'0' <= *
p && *
p <=
'9');
3064 auto num_digits =
p - begin;
3066 if (num_digits <= std::numeric_limits<int>::digits10)
3067 return static_cast<int>(
value);
3069 const unsigned max =
to_unsigned((std::numeric_limits<int>::max)());
3070 return num_digits == std::numeric_limits<int>::digits10 + 1 &&
3071 prev * 10ull + unsigned(
p[-1] -
'0') <= max
3072 ?
static_cast<int>(
value)
3077template <
typename Char,
typename Handler>
3081 auto align = align::none;
3090 align = align::left;
3093 align = align::right;
3096 align = align::center;
3101 if (
align != align::none)
3107 return handler.on_error(
"invalid fill character '{'"), begin;
3113 handler.on_align(
align);
3116 else if (
p == begin)
3125template <
typename Char>
3128 return (
'a' <= c && c <=
'z') || (
'A' <= c && c <=
'Z') ||
'_' == c;
3131template <
typename Char,
typename IDHandler>
3136 if (c >=
'0' && c <=
'9')
3144 if (begin == end || (*begin !=
'}' && *begin !=
':'))
3145 handler.on_error(
"invalid format string");
3152 handler.on_error(
"invalid format string");
3159 }
while (it != end && (
is_name_start(c = *it) || (
'0' <= c && c <=
'9')));
3164template <
typename Char,
typename IDHandler>
3168 if (c !=
'}' && c !=
':')
3174template <
typename Char,
typename Handler>
3177 using detail::auto_id;
3178 struct width_adapter
3184 handler.on_dynamic_width(
auto_id());
3188 handler.on_dynamic_width(
id);
3192 handler.on_dynamic_width(
id);
3202 if (
'0' <= *begin && *begin <=
'9')
3206 handler.on_width(width);
3208 handler.on_error(
"number is too big");
3210 else if (*begin ==
'{')
3214 begin =
parse_arg_id(begin, end, width_adapter{handler});
3215 if (begin == end || *begin !=
'}')
3216 return handler.on_error(
"invalid format string"), begin;
3222template <
typename Char,
typename Handler>
3225 using detail::auto_id;
3226 struct precision_adapter
3232 handler.on_dynamic_precision(
auto_id());
3236 handler.on_dynamic_precision(
id);
3240 handler.on_dynamic_precision(
id);
3250 auto c = begin != end ? *begin : Char();
3251 if (
'0' <= c && c <=
'9')
3254 if (precision != -1)
3255 handler.on_precision(precision);
3257 handler.on_error(
"number is too big");
3263 begin =
parse_arg_id(begin, end, precision_adapter{handler});
3264 if (begin == end || *begin++ !=
'}')
3265 return handler.on_error(
"invalid format string"), begin;
3269 return handler.on_error(
"missing precision specifier"), begin;
3271 handler.end_precision();
3275template <
typename Char>
3323template <
typename Char,
typename SpecHandler>
3326 SpecHandler&& handler)
3334 handler.on_error(
"invalid type specifier");
3335 handler.on_type(
type);
3350 handler.on_sign(sign::plus);
3354 handler.on_sign(sign::minus);
3358 handler.on_sign(sign::space);
3396 handler.on_localized();
3401 if (begin != end && *begin !=
'}')
3405 handler.on_error(
"invalid type specifier");
3406 handler.on_type(
type);
3411template <
typename Char,
typename Handler>
3421 arg_id = handler.on_arg_id();
3425 arg_id = handler.on_arg_id(
id);
3429 arg_id = handler.on_arg_id(
id);
3440 return handler.on_error(
"invalid format string"), end;
3443 handler.on_replacement_field(handler.on_arg_id(), begin);
3445 else if (*begin ==
'{')
3447 handler.on_text(begin, begin + 1);
3451 auto adapter = id_adapter{handler, 0};
3453 Char c = begin != end ? *begin : Char();
3456 handler.on_replacement_field(adapter.arg_id, begin);
3460 begin = handler.on_format_specs(adapter.arg_id, begin + 1, end);
3461 if (begin == end || *begin !=
'}')
3462 return handler.on_error(
"unknown format specifier"), end;
3466 return handler.on_error(
"missing '}' in format string"), end;
3472template <
bool IS_CONSTEXPR,
typename Char,
typename Handler>
3479 auto begin = format_str.
data();
3480 auto end = begin + format_str.
size();
3481 if (end - begin < 32)
3484 const Char*
p = begin;
3490 handler.on_text(begin,
p - 1);
3495 if (
p == end || *
p !=
'}')
3496 return handler.on_error(
"unmatched '}' in format string");
3497 handler.on_text(begin,
p);
3501 handler.on_text(begin, end);
3506 FMT_CONSTEXPR void operator()(
const Char* from,
const Char* to)
3512 const Char*
p =
nullptr;
3513 if (!find<IS_CONSTEXPR>(from, to, Char(
'}'),
p))
3514 return handler_.on_text(from, to);
3516 if (
p == to || *
p !=
'}')
3517 return handler_.
on_error(
"unmatched '}' in format string");
3518 handler_.on_text(from,
p);
3523 }
write = {handler};
3524 while (begin != end)
3528 const Char*
p = begin;
3529 if (*begin !=
'{' && !find<IS_CONSTEXPR>(begin + 1, end, Char(
'{'),
p))
3530 return write(begin, end);
3536template <typename T, bool = is_named_arg<T>::value>
3541template <
typename T>
3547template <
typename T,
typename ParseContext>
3549 ->
decltype(ctx.begin())
3551 using char_type =
typename ParseContext::char_type;
3561 return f.parse(ctx);
3564template <
typename ErrorHandler>
3569 eh.on_error(
"invalid type specifier");
3573template <
typename Char,
typename ErrorHandler = error_handler>
3575 ErrorHandler&& eh = {}) ->
bool
3584 if (specs.
align == align::numeric || specs.
sign != sign::none || specs.
alt)
3585 eh.on_error(
"invalid format specifier for char");
3609template <
typename ErrorHandler = error_handler,
typename Char>
3611 ErrorHandler&& eh = {})
3649 eh.on_error(
"invalid type specifier");
3655template <
typename ErrorHandler = error_handler>
3657 ErrorHandler&& eh = {}) ->
bool
3663 eh.on_error(
"invalid type specifier");
3667template <
typename ErrorHandler = error_handler>
3669 ErrorHandler&& eh = {})
3673 eh.on_error(
"invalid type specifier");
3676template <
typename ErrorHandler>
3681 eh.on_error(
"invalid type specifier");
3686template <
typename Handler>
3695 this->on_error(
"format specifier requires numeric argument");
3700 : Handler(handler), arg_type_(arg_type)
3706 if (
align == align::numeric)
3707 require_numeric_argument();
3708 Handler::on_align(
align);
3713 require_numeric_argument();
3718 this->on_error(
"format specifier requires signed argument");
3720 Handler::on_sign(
s);
3725 require_numeric_argument();
3731 require_numeric_argument();
3732 Handler::on_localized();
3737 require_numeric_argument();
3744 this->on_error(
"precision not allowed for this argument type");
3750#if FMT_USE_NONTYPE_TEMPLATE_ARGS
3751template <
int N,
typename T,
typename... Args,
typename Char>
3754 if constexpr (detail::is_statically_named_arg<T>())
3756 if (
name == T::name)
3759 if constexpr (
sizeof...(Args) > 0)
3766template <
typename... Args,
typename Char>
3769#if FMT_USE_NONTYPE_TEMPLATE_ARGS
3770 if constexpr (
sizeof...(Args) > 0)
3777template <
typename Char,
typename ErrorHandler,
typename... Args>
3785 static constexpr int num_args =
sizeof...(Args);
3791 parse_func parse_funcs_[num_args > 0 ?
static_cast<size_t>(num_args) : 1];
3792 type types_[num_args > 0 ?
static_cast<size_t>(num_args) : 1];
3797 : context_(format_str, num_args, types_, eh),
3819#if FMT_USE_NONTYPE_TEMPLATE_ARGS
3822 on_error(
"named argument is not found");
3826 on_error(
"compile-time checks for named arguments require C++20 support");
3840 return id >= 0 &&
id < num_args ? parse_funcs_[id](context_) : begin;
3853#ifdef FMT_ENFORCE_COMPILE_STRING
3855 "FMT_ENFORCE_COMPILE_STRING requires all format strings to use "
3866 (parse_format_string<true>(
s, checker(
s, {})),
true);
3870template <
typename Char>
3884template <
typename T,
typename Char>
3893 template <
typename ParseContext>
3896 auto begin = ctx.begin(), end = ctx.end();
3899 using handler_type = detail::dynamic_specs_handler<ParseContext>;
3900 auto type = detail::type_constant<T, Char>::value;
3902 detail::specs_checker<handler_type>(handler_type(specs_, ctx),
type);
3903 auto it = detail::parse_format_specs(begin, end, checker);
3904 auto eh = ctx.error_handler();
3907 case detail::type::none_type:
3910 case detail::type::bool_type:
3917 case detail::type::int_type:
3918 case detail::type::uint_type:
3919 case detail::type::long_long_type:
3920 case detail::type::ulong_long_type:
3921 case detail::type::int128_type:
3922 case detail::type::uint128_type:
3923 detail::check_int_type_spec(specs_.type, eh);
3925 case detail::type::char_type:
3926 detail::check_char_specs(specs_, eh);
3928 case detail::type::float_type:
3930 detail::parse_float_type_spec(specs_, eh);
3934 case detail::type::double_type:
3936 detail::parse_float_type_spec(specs_, eh);
3938 FMT_ASSERT(
false,
"double support disabled");
3940 case detail::type::long_double_type:
3942 detail::parse_float_type_spec(specs_, eh);
3944 FMT_ASSERT(
false,
"long double support disabled");
3946 case detail::type::cstring_type:
3947 detail::check_cstring_type_spec(specs_.type, eh);
3949 case detail::type::string_type:
3950 detail::check_string_type_spec(specs_.type, eh);
3952 case detail::type::pointer_type:
3953 detail::check_pointer_type_spec(specs_.type, eh);
3955 case detail::type::custom_type:
3963 template <detail::type U = detail::type_constant<T, Char>::value,
3965 U == detail::type::cstring_type ||
3966 U == detail::type::char_type),
3973 template <
typename FormatContext>
3975 ->
decltype(ctx.out());
3978#define FMT_FORMAT_AS(Type, Base) \
3979 template <typename Char> \
3980 struct formatter<Type, Char> : formatter<Base, Char> \
3982 template <typename FormatContext> \
3983 auto format(Type const& val, FormatContext& ctx) const \
3984 -> decltype(ctx.out()) \
3986 return formatter<Base, Char>::format(static_cast<Base>(val), ctx); \
4001template <
typename Char>
4008template <
typename Char,
typename... Args>
4015 template <
typename S,
4023 (std::is_base_of<detail::view, remove_reference_t<Args>>
::value &&
4024 std::is_reference<Args>::value)...>() == 0,
4025 "passing views as lvalues is disallowed");
4026#ifdef FMT_HAS_CONSTEVAL
4027 if constexpr (detail::count_named_args<Args...>() ==
4028 detail::count_statically_named_args<Args...>())
4030 using checker = detail::format_string_checker<Char, detail::error_handler,
4032 detail::parse_format_string<true>(str_, checker(
s, {}));
4035 detail::check_format_string<Args...>(
s);
4049#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
4051template <
typename...>
4058template <
typename... Args>
4089template <
typename... T>
4093 return vformat(
fmt, fmt::make_format_args(args...));
4097template <
typename OutputIt,
4098 FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
4101 using detail::get_buffer;
4102 auto&& buf = get_buffer<char>(
out);
4103 detail::vformat_to(buf,
fmt, args, {});
4104 return detail::get_iterator(buf);
4119template <
typename OutputIt,
typename... T,
FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
4126template <
typename OutputIt>
4135template <
typename OutputIt,
typename... T,
FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
4139 using traits = detail::fixed_buffer_traits;
4140 auto buf = detail::iterator_buffer<OutputIt, char, traits>(
out, n);
4141 detail::vformat_to(buf,
fmt, args, {});
4142 return {buf.out(), buf.count()};
4153template <
typename OutputIt,
typename... T,
FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
4160template <
typename... T>
4162 T&&... args) ->
size_t
4164 auto buf = detail::counting_buffer<>();
4165 detail::vformat_to(buf,
string_view(
fmt), fmt::make_format_args(args...), {});
4182template <
typename... T>
4185 const auto& vargs = fmt::make_format_args(args...);
4186 return detail::is_utf8() ?
vprint(
fmt, vargs)
4187 : detail::vprint_mojibake(stdout,
fmt, vargs);
4200template <
typename... T>
4203 const auto& vargs = fmt::make_format_args(args...);
4204 return detail::is_utf8() ?
vprint(f,
fmt, vargs)
4205 : detail::vprint_mojibake(f,
fmt, vargs);
4212#ifdef FMT_HEADER_ONLY
appender(base it) noexcept
Definition core.h:2034
auto operator++() noexcept -> appender &
Definition core.h:2040
std::back_insert_iterator< detail::buffer< char > > base
Definition core.h:2024
auto operator++(int) noexcept -> appender
Definition core.h:2044
FMT_UNCHECKED_ITERATOR(appender)
friend auto get_buffer(appender out) -> detail::buffer< char > &
Definition core.h:2027
formatter< T, char_type > formatter_type
Definition core.h:2353
basic_format_context(const basic_format_context &)=delete
detail::locale_ref loc_
Definition core.h:2346
OutputIt iterator
Definition core.h:2349
FMT_CONSTEXPR auto locale() -> detail::locale_ref
Definition core.h:2407
basic_format_arg< basic_format_context > format_arg
Definition core.h:2350
FMT_CONSTEXPR auto out() -> iterator
Definition core.h:2395
FMT_CONSTEXPR auto arg(basic_string_view< char_type > name) -> format_arg
Definition core.h:2372
Char char_type
Definition core.h:2341
FMT_CONSTEXPR auto arg_id(basic_string_view< char_type > name) -> int
Definition core.h:2376
void on_error(const char *message)
Definition core.h:2389
OutputIt out_
Definition core.h:2344
basic_format_parse_context< Char > parse_context_type
Definition core.h:2351
FMT_CONSTEXPR auto error_handler() -> detail::error_handler
Definition core.h:2385
constexpr auto arg(int id) const -> format_arg
Definition core.h:2368
auto args() const -> const basic_format_args< basic_format_context > &
Definition core.h:2380
void advance_to(iterator it)
Definition core.h:2401
constexpr basic_format_context(OutputIt out, basic_format_args< basic_format_context > ctx_args, detail::locale_ref loc=detail::locale_ref())
Definition core.h:2362
basic_format_context(basic_format_context &&)=default
void operator=(const basic_format_context &)=delete
basic_format_args< basic_format_context > args_
Definition core.h:2345
FMT_CONSTEXPR void do_check_arg_id(int id)
FMT_CONSTEXPR void check_dynamic_spec(int arg_id)
FMT_CONSTEXPR void check_arg_id(basic_string_view< Char >)
Definition core.h:840
constexpr auto error_handler() const -> ErrorHandler
Definition core.h:850
basic_string_view< Char > format_str_
Definition core.h:772
int next_arg_id_
Definition core.h:773
FMT_CONSTEXPR void on_error(const char *message)
Definition core.h:845
FMT_CONSTEXPR void check_arg_id(int id)
Definition core.h:830
constexpr auto end() const noexcept -> iterator
Definition core.h:799
Char char_type
Definition core.h:778
typename basic_string_view< Char >::iterator iterator
Definition core.h:779
FMT_CONSTEXPR auto next_arg_id() -> int
Definition core.h:814
FMT_CONSTEXPR void advance_to(iterator it)
Definition core.h:805
constexpr auto begin() const noexcept -> iterator
Definition core.h:791
constexpr basic_format_parse_context(basic_string_view< Char > format_str, ErrorHandler eh={}, int next_arg_id=0)
Definition core.h:781
FMT_CONSTEXPR basic_string_view(const std::basic_string< Char, Traits, Alloc > &s) noexcept
Definition core.h:522
const Char * data_
Definition core.h:485
constexpr auto end() const noexcept -> iterator
Definition core.h:550
const Char * iterator
Definition core.h:490
constexpr auto size() const noexcept -> size_t
Definition core.h:541
constexpr auto data() const noexcept -> const Char *
Definition core.h:535
FMT_CONSTEXPR_CHAR_TRAITS friend auto operator==(basic_string_view lhs, basic_string_view rhs) -> bool
Definition core.h:576
friend auto operator>(basic_string_view lhs, basic_string_view rhs) -> bool
Definition core.h:594
constexpr auto begin() const noexcept -> iterator
Definition core.h:546
friend auto operator<(basic_string_view lhs, basic_string_view rhs) -> bool
Definition core.h:586
Char value_type
Definition core.h:489
FMT_CONSTEXPR basic_string_view(S s) noexcept
Definition core.h:529
friend auto operator<=(basic_string_view lhs, basic_string_view rhs) -> bool
Definition core.h:590
FMT_CONSTEXPR void remove_prefix(size_t n) noexcept
Definition core.h:560
FMT_CONSTEXPR_CHAR_TRAITS FMT_INLINE basic_string_view(const Char *s)
Definition core.h:511
friend auto operator!=(basic_string_view lhs, basic_string_view rhs) -> bool
Definition core.h:582
constexpr auto operator[](size_t pos) const noexcept -> const Char &
Definition core.h:555
constexpr basic_string_view(const Char *s, size_t count) noexcept
Definition core.h:498
constexpr basic_string_view() noexcept
Definition core.h:492
friend auto operator>=(basic_string_view lhs, basic_string_view rhs) -> bool
Definition core.h:598
size_t size_
Definition core.h:486
FMT_CONSTEXPR_CHAR_TRAITS auto compare(basic_string_view other) const -> int
Definition core.h:567
constexpr auto capacity() const noexcept -> size_t
Definition core.h:1096
void append(const U *begin, const U *end)
FMT_CONSTEXPR20 ~buffer()=default
size_t size_
Definition core.h:1035
auto end() noexcept -> T *
Definition core.h:1075
FMT_CONSTEXPR20 void try_reserve(size_t new_capacity)
Definition core.h:1131
buffer(const buffer &)=delete
void clear()
Definition core.h:1114
FMT_CONSTEXPR20 void push_back(const T &value)
Definition core.h:1137
FMT_CONSTEXPR auto data() noexcept -> T *
Definition core.h:1102
auto begin() const noexcept -> const T *
Definition core.h:1080
FMT_CONSTEXPR auto operator[](Idx index) -> T &
Definition core.h:1148
const T & const_reference
Definition core.h:1066
virtual FMT_CONSTEXPR20 void grow(size_t capacity)=0
T value_type
Definition core.h:1065
auto end() const noexcept -> const T *
Definition core.h:1084
FMT_CONSTEXPR auto operator[](Idx index) const -> const T &
Definition core.h:1153
size_t capacity_
Definition core.h:1036
FMT_CONSTEXPR20 buffer(T *p=nullptr, size_t sz=0, size_t cap=0) noexcept
Definition core.h:1046
T * ptr_
Definition core.h:1034
FMT_CONSTEXPR20 void try_resize(size_t count)
Definition core.h:1121
FMT_CONSTEXPR auto data() const noexcept -> const T *
Definition core.h:1108
void operator=(const buffer &)=delete
FMT_CONSTEXPR void set(T *buf_data, size_t buf_capacity) noexcept
Definition core.h:1055
constexpr auto size() const noexcept -> size_t
Definition core.h:1090
buffer(buffer &&)=default
auto begin() noexcept -> T *
Definition core.h:1071
const type * types_
Definition core.h:866
constexpr auto num_args() const -> int
Definition core.h:876
FMT_CONSTEXPR void check_arg_id(int id)
Definition core.h:893
FMT_CONSTEXPR void check_dynamic_spec(int arg_id)
Definition core.h:901
FMT_CONSTEXPR compile_parse_context(basic_string_view< Char > format_str, int num_args, const type *types, ErrorHandler eh={}, int next_arg_id=0)
Definition core.h:870
basic_format_parse_context< Char, ErrorHandler > base
Definition core.h:867
FMT_CONSTEXPR auto next_arg_id() -> int
Definition core.h:885
int num_args_
Definition core.h:865
constexpr auto arg_type(int id) const -> type
Definition core.h:880
@ buffer_size
Definition core.h:1371
FMT_CONSTEXPR20 void grow(size_t) override
Definition core.h:1377
auto count() -> size_t
Definition core.h:1391
T data_[buffer_size]
Definition core.h:1373
size_t count_
Definition core.h:1374
counting_buffer()
Definition core.h:1386
typename ParseContext::char_type char_type
Definition core.h:2931
FMT_CONSTEXPR dynamic_specs_handler(const dynamic_specs_handler &other)
Definition core.h:2939
ParseContext & context_
Definition core.h:2965
dynamic_format_specs< char_type > & specs_
Definition core.h:2964
FMT_CONSTEXPR dynamic_specs_handler(dynamic_format_specs< char_type > &specs, ParseContext &ctx)
Definition core.h:2933
FMT_CONSTEXPR void on_dynamic_precision(Id arg_id)
Definition core.h:2953
FMT_CONSTEXPR auto make_arg_ref(int arg_id) -> arg_ref_type
Definition core.h:2969
FMT_CONSTEXPR void on_error(const char *message)
Definition core.h:2958
FMT_CONSTEXPR void on_dynamic_width(Id arg_id)
Definition core.h:2947
FMT_CONSTEXPR auto make_arg_ref(auto_id) -> arg_ref_type
Definition core.h:2976
FMT_CONSTEXPR auto make_arg_ref(basic_string_view< char_type > arg_id) -> arg_ref_type
Definition core.h:2983
size_t count_
Definition core.h:1177
size_t limit_
Definition core.h:1178
fixed_buffer_traits(size_t limit)
Definition core.h:1181
auto limit(size_t size) -> size_t
Definition core.h:1189
auto count() const -> size_t
Definition core.h:1185
iterator_buffer(T *out, size_t n=buffer_size)
Definition core.h:1280
auto count() const -> size_t
Definition core.h:1305
auto out() -> T *
Definition core.h:1300
void flush()
Definition core.h:1268
T * out_
Definition core.h:1254
FMT_CONSTEXPR20 void grow(size_t) override
Definition core.h:1262
~iterator_buffer()
Definition core.h:1295
iterator_buffer(iterator_buffer &&other)
Definition core.h:1284
iterator_buffer(T *out, size_t=0)
Definition core.h:1320
auto out() -> T *
Definition core.h:1325
FMT_CONSTEXPR20 void grow(size_t) override
Definition core.h:1315
Container & container_
Definition core.h:1339
iterator_buffer(Container &c)
Definition core.h:1349
FMT_CONSTEXPR20 void grow(size_t capacity) override
Definition core.h:1342
iterator_buffer(std::back_insert_iterator< Container > out, size_t=0)
Definition core.h:1353
auto out() -> std::back_insert_iterator< Container >
Definition core.h:1358
auto out() -> OutputIt
Definition core.h:1237
iterator_buffer(OutputIt out, size_t n=buffer_size)
Definition core.h:1224
auto count() const -> size_t
Definition core.h:1242
@ buffer_size
Definition core.h:1205
void flush()
Definition core.h:1216
iterator_buffer(iterator_buffer &&other)
Definition core.h:1228
OutputIt out_
Definition core.h:1202
T data_[buffer_size]
Definition core.h:1207
FMT_CONSTEXPR20 void grow(size_t) override
Definition core.h:1210
~iterator_buffer()
Definition core.h:1232
const void * locale_
Definition core.h:2247
constexpr locale_ref()
Definition core.h:2250
auto get() const -> Locale
FMT_CONSTEXPR void end_precision()
Definition core.h:3741
FMT_CONSTEXPR void on_zero()
Definition core.h:3735
detail::type arg_type_
Definition core.h:3690
FMT_CONSTEXPR specs_checker(const Handler &handler, detail::type arg_type)
Definition core.h:3699
FMT_CONSTEXPR void on_align(align_t align)
Definition core.h:3704
FMT_CONSTEXPR void on_hash()
Definition core.h:3723
FMT_CONSTEXPR void require_numeric_argument()
Definition core.h:3692
FMT_CONSTEXPR void on_sign(sign_t s)
Definition core.h:3711
FMT_CONSTEXPR void on_localized()
Definition core.h:3729
FMT_CONSTEXPR void on_sign(sign_t s)
Definition core.h:2886
basic_format_specs< Char > & specs_
Definition core.h:2865
FMT_CONSTEXPR void on_precision(int precision)
Definition core.h:2910
FMT_CONSTEXPR specs_setter(basic_format_specs< Char > &specs)
Definition core.h:2868
FMT_CONSTEXPR void on_hash()
Definition core.h:2890
FMT_CONSTEXPR void on_zero()
Definition core.h:2899
FMT_CONSTEXPR void on_localized()
Definition core.h:2894
FMT_CONSTEXPR specs_setter(const specs_setter &other)
Definition core.h:2873
FMT_CONSTEXPR void on_width(int width)
Definition core.h:2906
FMT_CONSTEXPR void end_precision()
Definition core.h:2914
FMT_CONSTEXPR void on_align(align_t align)
Definition core.h:2878
FMT_CONSTEXPR void on_type(presentation_type type)
Definition core.h:2918
FMT_CONSTEXPR void on_fill(basic_string_view< Char > fill)
Definition core.h:2882
FMT_CONSTEXPR FMT_INLINE value(const char_type *val)
Definition core.h:1669
long double long_double_value
Definition core.h:1614
value(unformattable_pointer)
constexpr FMT_INLINE value(char_type val)
Definition core.h:1665
static void format_custom_arg(void *arg, typename Context::parse_context_type &parse_ctx, Context &ctx)
Definition core.h:1711
long long long_long_value
Definition core.h:1606
const void * pointer
Definition core.h:1615
constexpr FMT_INLINE value()
Definition core.h:1621
value(unformattable_char)
constexpr FMT_INLINE value(bool val)
Definition core.h:1661
constexpr FMT_INLINE value(int val)
Definition core.h:1625
constexpr FMT_INLINE value(float val)
Definition core.h:1649
constexpr FMT_INLINE value(unsigned long long val)
Definition core.h:1637
FMT_INLINE value(const named_arg_info< char_type > *args, size_t size)
Definition core.h:1684
constexpr FMT_INLINE value(unsigned val)
Definition core.h:1629
constexpr FMT_INLINE value(long long val)
Definition core.h:1633
value(unformattable_const)
bool bool_value
Definition core.h:1610
monostate no_value
Definition core.h:1603
constexpr FMT_INLINE value(double val)
Definition core.h:1653
unsigned long long ulong_long_value
Definition core.h:1607
FMT_INLINE value(uint128_opt val)
Definition core.h:1645
char_type char_value
Definition core.h:1611
int128_opt int128_value
Definition core.h:1608
float float_value
Definition core.h:1612
typename Context::char_type char_type
Definition core.h:1600
int int_value
Definition core.h:1604
FMT_INLINE value(long double val)
Definition core.h:1657
FMT_INLINE value(const void *val)
Definition core.h:1680
unsigned uint_value
Definition core.h:1605
FMT_CONSTEXPR FMT_INLINE value(basic_string_view< char_type > val)
Definition core.h:1675
FMT_CONSTEXPR FMT_INLINE value(T &val)
Definition core.h:1690
custom_value< Context > custom
Definition core.h:1617
named_arg_value< char_type > named_args
Definition core.h:1618
uint128_opt uint128_value
Definition core.h:1609
string_value< char_type > string
Definition core.h:1616
FMT_INLINE value(int128_opt val)
Definition core.h:1641
double double_value
Definition core.h:1613
FMT_CONSTEXPR bool is_name_start(Char c)
Definition core.h:3126
typename std::enable_if< B, T >::type enable_if_t
Definition core.h:302
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
Definition core.h:3032
constexpr FMT_INLINE auto const_check(T value) -> T
Definition core.h:390
#define FMT_ASSERT(condition, message)
Definition core.h:403
FMT_NODISCARD FMT_INLINE auto format(format_string< T... > fmt, T &&... args) -> std::string
Definition core.h:4090
FMT_CONSTEXPR FMT_INLINE auto visit_format_arg(Visitor &&vis, const basic_format_arg< Context > &arg) -> decltype(vis(0))
Definition core.h:2133
FMT_CONSTEXPR auto copy_str(InputIt begin, InputIt end, OutputIt out) -> OutputIt
Definition core.h:1006
FMT_CONSTEXPR auto make_arg(T &&value) -> basic_format_arg< Context >
Definition core.h:2311
FMT_CONSTEXPR FMT_INLINE auto parse_format_specs(const Char *begin, const Char *end, SpecHandler &&handler) -> const Char *
Definition core.h:3324
FMT_CONSTEXPR auto code_point_length(const Char *begin) -> int
Definition core.h:3018
#define FMT_ENUM_UNDERLYING_TYPE(type)
Definition core.h:2674
std::integral_constant< bool, B > bool_constant
Definition core.h:306
FMT_NODISCARD FMT_INLINE auto formatted_size(format_string< T... > fmt, T &&... args) -> size_t
Definition core.h:4161
#define FMT_FORMAT_AS(Type, Base)
Definition core.h:3978
#define FMT_USE_LONG_DOUBLE
Definition core.h:192
#define FMT_FORWARD(...)
Definition core.h:204
#define FMT_CONSTEVAL
Definition core.h:276
#define FMT_TYPE_CONSTANT(Type, constant)
Definition core.h:710
constexpr bool is_ascii_letter(Char c)
Definition core.h:2994
basic_string_view< char > string_view
Definition core.h:604
FMT_CONSTEXPR auto parse_replacement_field(const Char *begin, const Char *end, Handler &&handler) -> const Char *
Definition core.h:3412
FMT_CONSTEXPR auto code_point_length_impl(char c) -> int
Definition core.h:3011
#define FMT_UNICODE
Definition core.h:264
align::type align_t
Definition core.h:2687
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
Definition core.h:2506
conditional_t< long_short, unsigned, unsigned long long > ulong_type
Definition core.h:1733
FMT_CONSTEXPR auto check_char_specs(const basic_format_specs< Char > &specs, ErrorHandler &&eh={}) -> bool
Definition core.h:3574
typename std::remove_const< T >::type remove_const_t
Definition core.h:310
#define FMT_FALLTHROUGH
Definition core.h:174
#define FMT_NODISCARD
Definition core.h:181
void init_named_args(named_arg_info< Char > *, int, int)
Definition core.h:1501
@ packed_arg_bits
Definition core.h:2002
typename std::remove_reference< T >::type remove_reference_t
Definition core.h:308
uint128_opt
Definition core.h:443
typename detail::char_t_impl< S >::type char_t
Definition core.h:759
#define FMT_END_DETAIL_NAMESPACE
Definition core.h:231
buffer_context< char > format_context
Definition core.h:2416
#define FMT_MODULE_EXPORT_BEGIN
Definition core.h:226
FMT_API void vprint(string_view fmt, format_args args)
Definition format-inl.h:1648
#define FMT_USE_FLOAT
Definition core.h:186
auto vformat_to_n(OutputIt out, size_t n, string_view fmt, format_args args) -> format_to_n_result< OutputIt >
Definition core.h:4136
FMT_CONSTEXPR auto parse_precision(const Char *begin, const Char *end, Handler &&handler) -> const Char *
Definition core.h:3223
FMT_CONSTEXPR FMT_INLINE auto make_value(T &&val) -> value< Context >
Definition core.h:2280
FMT_API void vprint_mojibake(std::FILE *, string_view, format_args)
Definition core.h:3876
FMT_CONSTEXPR void check_string_type_spec(presentation_type type, ErrorHandler &&eh={})
Definition core.h:3668
#define FMT_GCC_VERSION
Definition core.h:32
constexpr auto count() -> size_t
Definition core.h:1538
std::false_type has_fallback_formatter
Definition core.h:1430
FMT_CONSTEXPR auto parse_presentation_type(Char type) -> presentation_type
Definition core.h:3276
basic_format_string< char, type_identity_t< Args >... > format_string
Definition core.h:4059
constexpr auto to_ascii(Char c) -> Char
Definition core.h:3001
FMT_INLINE void print(format_string< T... > fmt, T &&... args)
Definition core.h:4183
constexpr auto count_named_args() -> size_t
Definition core.h:1549
int128_opt
Definition core.h:440
constexpr auto make_format_args(Args &&... args) -> format_arg_store< Context, remove_cvref_t< Args >... >
Definition core.h:2488
#define FMT_GCC_PRAGMA(arg)
Definition core.h:40
#define FMT_CONSTEXPR
Definition core.h:106
FMT_CONSTEXPR FMT_INLINE void parse_format_string(basic_string_view< Char > format_str, Handler &&handler)
Definition core.h:3473
std::is_constructible< typename Context::template formatter_type< T > > has_formatter
Definition core.h:953
FMT_CONSTEXPR void check_pointer_type_spec(presentation_type type, ErrorHandler &&eh)
Definition core.h:3677
FMT_CONSTEXPR auto parse_width(const Char *begin, const Char *end, Handler &&handler) -> const Char *
Definition core.h:3175
type
Definition core.h:681
constexpr bool is_integral_type(type t)
Definition core.h:732
basic_format_parse_context< char > format_parse_context
Definition core.h:856
arg_id_kind
Definition core.h:2799
float_format
Definition core.h:3591
FMT_NORETURN FMT_API void assert_fail(const char *file, int line, const char *message)
FMT_CONSTEXPR void check_int_type_spec(presentation_type type, ErrorHandler &&eh)
Definition core.h:3565
bool_constant< !std::is_base_of< detail::unformattable, decltype(detail::arg_mapper< buffer_context< Char > >().map(std::declval< T >()))>::value &&!detail::has_fallback_formatter< T, Char >::value > is_formattable
Definition core.h:2427
#define FMT_BEGIN_NAMESPACE
Definition core.h:214
#define FMT_DEPRECATED
Definition core.h:152
conditional_t< long_short, int, long long > long_type
Definition core.h:1732
FMT_CONSTEXPR auto do_parse_arg_id(const Char *begin, const Char *end, IDHandler &&handler) -> const Char *
Definition core.h:3132
basic_format_specs< char > format_specs
Definition core.h:2794
#define FMT_BEGIN_DETAIL_NAMESPACE
Definition core.h:228
#define FMT_API
Definition core.h:250
FMT_INLINE void check_format_string(const S &)
Definition core.h:3851
void vformat_to(buffer< Char > &buf, basic_string_view< Char > fmt, basic_format_args< FMT_BUFFER_CONTEXT(type_identity_t< Char >)> args, locale_ref loc={})
Definition format.h:4857
FMT_BEGIN_DETAIL_NAMESPACE FMT_CONSTEXPR void ignore_unused(const T &...)
Definition core.h:373
constexpr auto encode_types() -> unsigned long long
Definition core.h:2267
constexpr FMT_INLINE auto is_constant_evaluated(bool default_value=false) noexcept -> bool
Definition core.h:377
#define FMT_BUFFER_CONTEXT(Char)
Definition core.h:2419
constexpr auto is_utf8() -> bool
Definition core.h:465
conditional_t< std::is_same< T, char >::value, appender, std::back_insert_iterator< buffer< T > > > buffer_appender
Definition core.h:1398
FMT_CONSTEXPR auto check_cstring_type_spec(presentation_type type, ErrorHandler &&eh={}) -> bool
Definition core.h:3656
@ long_short
Definition core.h:1730
auto get_buffer(OutputIt out) -> iterator_buffer< OutputIt, T >
Definition core.h:1402
@ max_packed_args
Definition core.h:2007
constexpr auto count_statically_named_args() -> size_t
Definition core.h:1555
#define FMT_ENABLE_IF(...)
Definition core.h:364
@ has_named_args_bit
Definition core.h:2015
FMT_INLINE auto format_to_n(OutputIt out, size_t n, format_string< T... > fmt, T &&... args) -> format_to_n_result< OutputIt >
Definition core.h:4154
void void_t
Definition core.h:2201
#define FMT_CONSTEXPR_CHAR_TRAITS
Definition core.h:130
#define FMT_INLINE
Definition core.h:199
auto get_iterator(Buffer &buf) -> decltype(buf.out())
Definition core.h:1408
FMT_CONSTEXPR auto to_unsigned(Int value) -> typename std::make_unsigned< Int >::type
Definition core.h:455
auto convert_for_visit(T) -> monostate
Definition core.h:447
@ is_unpacked_bit
Definition core.h:2011
FMT_CONSTEXPR FMT_INLINE auto parse_arg_id(const Char *begin, const Char *end, IDHandler &&handler) -> const Char *
Definition core.h:3165
FMT_NORETURN FMT_API void throw_format_error(const char *message)
FMT_CONSTEXPR auto parse_nonnegative_int(const Char *&begin, const Char *end, int error_value) noexcept -> int
Definition core.h:3053
FMT_INLINE auto to_string_view(const Char *s) -> basic_string_view< Char >
Definition core.h:630
#define FMT_NORETURN
Definition core.h:163
#define FMT_MSC_WARNING(...)
Definition core.h:57
typename type_identity< T >::type type_identity_t
Definition core.h:319
FMT_INLINE auto format_to(OutputIt out, format_string< T... > fmt, T &&... args) -> OutputIt
Definition core.h:4120
typename std::conditional< B, T, F >::type conditional_t
Definition core.h:304
#define FMT_CONSTEXPR20
Definition core.h:114
auto get_container(std::back_insert_iterator< Container > it) -> Container &
Definition core.h:990
sign::type sign_t
Definition core.h:2698
typename std::remove_cv< remove_reference_t< T > >::type remove_cvref_t
Definition core.h:312
auto runtime(string_view s) -> basic_runtime< char >
Definition core.h:4070
type_constant< decltype(arg_mapper< Context >().map(std::declval< const T & >())), typename Context::char_type > mapped_type_constant
Definition core.h:1998
constexpr int invalid_arg_index
Definition core.h:3748
#define FMT_USE_DOUBLE
Definition core.h:189
typename std::underlying_type< T >::type underlying_t
Definition core.h:321
presentation_type
Definition core.h:2746
#define FMT_END_NAMESPACE
Definition core.h:219
FMT_BEGIN_DETAIL_NAMESPACE constexpr auto has_const_formatter_impl(T *) -> decltype(typename Context::template formatter_type< T >().format(std::declval< const T & >(), std::declval< Context & >()), true)
Definition core.h:970
constexpr bool is_arithmetic_type(type t)
Definition core.h:737
#define FMT_MODULE_EXPORT_END
Definition core.h:227
constexpr auto has_const_formatter() -> bool
Definition core.h:983
FMT_CONSTEXPR auto parse_float_type_spec(const basic_format_specs< Char > &specs, ErrorHandler &&eh={}) -> float_specs
Definition core.h:3610
FMT_API auto vformat(string_view fmt, format_args args) -> std::string
Definition format-inl.h:1578
auto find< false, char >(const char *first, const char *last, char value, const char *&out) -> bool
Definition core.h:3043
constexpr unsigned char micro[]
Definition core.h:463
FMT_CONSTEXPR auto get_arg_index_by_name(basic_string_view< Char > name) -> int
Definition core.h:3767
FMT_CONSTEXPR auto parse_align(const Char *begin, const Char *end, Handler &&handler) -> const Char *
Definition core.h:3078
#define out
Definition encodings.cpp:5
const float space
Definition gdiplus_container.cpp:148
result
Definition format.h:3059
Definition bin_to_hex.h:111
FMT_CONSTEXPR FMT_INLINE auto named_args() -> std::nullptr_t
Definition core.h:1494
FMT_CONSTEXPR FMT_INLINE auto args() const -> const T *
Definition core.h:1490
FMT_CONSTEXPR FMT_INLINE arg_data(const U &... init)
Definition core.h:1486
T args_[1+(NUM_ARGS !=0 ? NUM_ARGS :+1)]
Definition core.h:1460
arg_data(const arg_data &other)=delete
auto args() const -> const T *
Definition core.h:1469
auto named_args() -> named_arg_info< Char > *
Definition core.h:1473
named_arg_info< Char > named_args_[NUM_NAMED_ARGS]
Definition core.h:1461
arg_data(const U &... init)
Definition core.h:1464
FMT_CONSTEXPR FMT_INLINE auto map(float val) -> float
Definition core.h:1834
FMT_CONSTEXPR FMT_INLINE auto map(long double val) -> long double
Definition core.h:1842
FMT_CONSTEXPR FMT_INLINE auto map(const T(&values)[N]) -> const T(&)[N]
Definition core.h:1921
FMT_CONSTEXPR FMT_INLINE auto map(unsigned val) -> unsigned
Definition core.h:1783
typename Context::char_type char_type
Definition core.h:1761
FMT_CONSTEXPR FMT_INLINE auto do_map(T &&val) -> T &
Definition core.h:1963
auto map(...) -> unformattable
Definition core.h:1988
FMT_DEPRECATED FMT_CONSTEXPR FMT_INLINE auto map(const T &val) -> decltype(std::declval< arg_mapper >().map(static_cast< underlying_t< T > >(val)))
Definition core.h:1931
FMT_CONSTEXPR FMT_INLINE auto map(double val) -> double
Definition core.h:1838
FMT_CONSTEXPR FMT_INLINE auto map(unsigned long val) -> ulong_type
Definition core.h:1791
FMT_CONSTEXPR FMT_INLINE auto map(const char_type *val) -> const char_type *
Definition core.h:1851
FMT_CONSTEXPR FMT_INLINE auto map(int128_opt val) -> int128_opt
Definition core.h:1804
FMT_CONSTEXPR FMT_INLINE auto map(int val) -> int
Definition core.h:1779
FMT_CONSTEXPR FMT_INLINE auto map(const T &val) -> decltype(std::declval< arg_mapper >().map(format_as(T())))
Definition core.h:1939
FMT_CONSTEXPR FMT_INLINE auto map(long long val) -> long long
Definition core.h:1795
FMT_CONSTEXPR FMT_INLINE auto map(char_type *val) -> const char_type *
Definition core.h:1847
FMT_CONSTEXPR FMT_INLINE auto map(signed char val) -> int
Definition core.h:1763
FMT_CONSTEXPR auto map(const T &) -> unformattable_pointer
Definition core.h:1915
FMT_CONSTEXPR FMT_INLINE auto map(std::nullptr_t val) -> const void *
Definition core.h:1900
FMT_CONSTEXPR FMT_INLINE auto map(T) -> unformattable_char
Definition core.h:1829
FMT_CONSTEXPR FMT_INLINE auto map(bool val) -> bool
Definition core.h:1812
FMT_CONSTEXPR FMT_INLINE auto map(unsigned short val) -> unsigned
Definition core.h:1775
FMT_CONSTEXPR FMT_INLINE auto map(uint128_opt val) -> uint128_opt
Definition core.h:1808
FMT_CONSTEXPR FMT_INLINE auto map(const T &val) -> basic_string_view< char_type >
Definition core.h:1858
FMT_CONSTEXPR FMT_INLINE auto map(void *val) -> const void *
Definition core.h:1892
FMT_CONSTEXPR FMT_INLINE auto map(unsigned long long val) -> unsigned long long
Definition core.h:1799
FMT_CONSTEXPR FMT_INLINE auto map(T &&val) -> decltype(this->do_map(std::forward< T >(val)))
Definition core.h:1975
FMT_CONSTEXPR FMT_INLINE auto map(long val) -> long_type
Definition core.h:1787
FMT_CONSTEXPR FMT_INLINE auto map(T val) -> char_type
Definition core.h:1818
FMT_CONSTEXPR FMT_INLINE auto map(short val) -> int
Definition core.h:1771
FMT_CONSTEXPR FMT_INLINE auto map(const T &) -> unformattable_char
Definition core.h:1866
FMT_CONSTEXPR FMT_INLINE auto map(const void *val) -> const void *
Definition core.h:1896
FMT_CONSTEXPR FMT_INLINE auto do_map(T &&) -> unformattable_const
Definition core.h:1968
FMT_CONSTEXPR FMT_INLINE auto map(unsigned char val) -> unsigned
Definition core.h:1767
FMT_CONSTEXPR FMT_INLINE auto map(const T &named_arg) -> decltype(std::declval< arg_mapper >().map(named_arg.value))
Definition core.h:1982
FMT_CONSTEXPR arg_ref(basic_string_view< Char > name)
Definition core.h:2818
FMT_CONSTEXPR arg_ref()
Definition core.h:2809
FMT_CONSTEXPR auto operator=(int idx) -> arg_ref &
Definition core.h:2823
arg_id_kind kind
Definition core.h:2830
FMT_CONSTEXPR arg_ref(int index)
Definition core.h:2814
basic_string_view< Char > str
Definition core.h:4004
buffer_traits(size_t)
Definition core.h:1161
auto limit(size_t size) -> size_t
Definition core.h:1168
auto count() const -> size_t
Definition core.h:1164
decltype(to_string_view(std::declval< S >())) result
Definition core.h:676
typename result::value_type type
Definition core.h:677
void(* format)(void *arg, parse_context &parse_ctx, Context &ctx)
Definition core.h:1592
void * value
Definition core.h:1591
typename Context::parse_context_type parse_context
Definition core.h:1590
FMT_NORETURN void on_error(const char *message)
Definition core.h:750
constexpr error_handler()=default
constexpr error_handler(const error_handler &)=default
FMT_CONSTEXPR void operator=(basic_string_view< Char > s)
Definition core.h:2715
FMT_CONSTEXPR auto operator[](size_t index) const -> const Char &
Definition core.h:2738
constexpr auto size() const -> size_t
Definition core.h:2725
constexpr auto data() const -> const Char *
Definition core.h:2729
FMT_CONSTEXPR auto operator[](size_t index) -> Char &
Definition core.h:2734
float_format format
Definition core.h:3601
int precision
Definition core.h:3600
bool upper
Definition core.h:3603
bool showpoint
Definition core.h:3606
sign_t sign
Definition core.h:3602
bool binary32
Definition core.h:3605
bool locale
Definition core.h:3604
constexpr monostate()
Definition core.h:353
const Char * name
Definition core.h:1451
int id
Definition core.h:1452
const named_arg_info< Char > * data
Definition core.h:1583
size_t size
Definition core.h:1584
const T & value
Definition core.h:1441
const Char * name
Definition core.h:1440
named_arg(const Char *n, const T &v)
Definition core.h:1442
const Char * data
Definition core.h:1576
size_t size
Definition core.h:1577
remove_cvref_t< decltype(T::value)> type
Definition core.h:3544
T type
Definition core.h:3539
T type
Definition core.h:316
annotation desc
Definition tag_strings.h:99
b
Definition tag_strings.h:61
s
Definition tag_strings.h:47
base
Definition tag_strings.h:7
template
Definition tag_strings.h:13
i
Definition tag_strings.h:60
annotation center
Definition tag_strings.h:147
map
Definition tag_strings.h:86
p
Definition tag_strings.h:29
int index
Definition core.h:2841
basic_string_view< Char > name
Definition core.h:2842
FMT_CONSTEXPR value(basic_string_view< Char > n)
Definition core.h:2836
FMT_CONSTEXPR value(int id=0)
Definition core.h:2832