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
106# define FMT_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))
149# elif FMT_MSC_VERSION
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]]
181# define FMT_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 \
216 inline namespace v9 {
217# define FMT_END_NAMESPACE \
222#ifndef FMT_MODULE_EXPORT
223# define FMT_MODULE_EXPORT
224# define FMT_MODULE_EXPORT_BEGIN
225# define FMT_MODULE_EXPORT_END
226# define FMT_BEGIN_DETAIL_NAMESPACE namespace detail {
227# define FMT_END_DETAIL_NAMESPACE }
230#if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
231# define FMT_CLASS_API FMT_MSC_WARNING(suppress : 4275)
233# define FMT_API __declspec(dllexport)
234# elif defined(FMT_SHARED)
235# define FMT_API __declspec(dllimport)
238# define FMT_CLASS_API
239# if defined(FMT_EXPORT) || defined(FMT_SHARED)
240# if defined(__GNUC__) || defined(__clang__)
241# define FMT_API __attribute__((visibility("default")))
250#if FMT_HAS_INCLUDE(<string_view>) && \
251 (FMT_CPLUSPLUS >= 201703L || defined(_LIBCPP_VERSION))
252# include <string_view>
253# define FMT_USE_STRING_VIEW
254#elif FMT_HAS_INCLUDE("experimental/string_view") && FMT_CPLUSPLUS >= 201402L
255# include <experimental/string_view>
256# define FMT_USE_EXPERIMENTAL_STRING_VIEW
260# define FMT_UNICODE !FMT_MSC_VERSION
264# if ((FMT_GCC_VERSION >= 1000 || FMT_CLANG_VERSION >= 1101) && \
265 FMT_CPLUSPLUS >= 202002L && !defined(__apple_build_version__)) || \
266 (defined(__cpp_consteval) && \
267 (!FMT_MSC_VERSION || _MSC_FULL_VER >= 193030704))
269# define FMT_CONSTEVAL consteval
270# define FMT_HAS_CONSTEVAL
272# define FMT_CONSTEVAL
276#ifndef FMT_USE_NONTYPE_TEMPLATE_ARGS
277# if defined(__cpp_nontype_template_args) && \
278 ((FMT_GCC_VERSION >= 903 && FMT_CPLUSPLUS >= 201709L) || \
279 __cpp_nontype_template_args >= 201911L) && \
280 !defined(__NVCOMPILER)
281# define FMT_USE_NONTYPE_TEMPLATE_ARGS 1
283# define FMT_USE_NONTYPE_TEMPLATE_ARGS 0
289#if !defined(__OPTIMIZE__) && !defined(__NVCOMPILER)
297template <
bool B,
typename T =
void>
299template <
bool B,
typename T,
typename F>
315template <
typename P1,
typename... Pn>
321template <
typename P1,
typename... Pn>
333# define FMT_ENABLE_IF(...)
335# define FMT_ENABLE_IF(...) enable_if_t<(__VA_ARGS__), int> = 0
346 bool default_value =
false) noexcept ->
bool {
347#ifdef __cpp_lib_is_constant_evaluated
351 return default_value;
361 const char* message);
366# define FMT_ASSERT(condition, message) \
367 ::fmt::detail::ignore_unused((condition), (message))
369# define FMT_ASSERT(condition, message) \
372 : ::fmt::detail::assert_fail(__FILE__, __LINE__, (message)))
376#if defined(FMT_USE_STRING_VIEW)
377template <
typename Char>
using std_string_view = std::basic_string_view<Char>;
378#elif defined(FMT_USE_EXPERIMENTAL_STRING_VIEW)
379template <
typename Char>
387#elif defined(__SIZEOF_INT128__) && !defined(__NVCC__) && \
388 !(FMT_CLANG_VERSION && FMT_MSC_VERSION)
389# define FMT_USE_INT128 1
396# define FMT_USE_INT128 0
406template <
typename Int>
409 FMT_ASSERT(std::is_unsigned<Int>::value ||
value >= 0,
"negative value");
417 using uchar =
unsigned char;
419 uchar(
micro[1]) == 0xB5);
443 : data_(s), size_(
count) {}
457 ?
std::strlen(reinterpret_cast<const char*>(s))
458 :
std::char_traits<Char>::length(s)) {}
461 template <
typename Traits,
typename Alloc>
463 const std::basic_string<Char, Traits, Alloc>& s) noexcept
464 : data_(s.data()), size_(s.size()) {}
467 S, detail::std_string_view<Char>>
::value)>
469 : data_(s.data()), size_(s.size()) {}
472 constexpr auto data() const noexcept -> const Char* {
return data_; }
475 constexpr auto size() const noexcept ->
size_t {
return size_; }
478 constexpr auto end() const noexcept ->
iterator {
return data_ + size_; }
480 constexpr auto operator[](
size_t pos)
const noexcept ->
const Char& {
491 size_t str_size = size_ < other.size_ ? size_ : other.size_;
492 int result = std::char_traits<Char>::compare(data_, other.data_, str_size);
494 result = size_ == other.size_ ? 0 : (size_ < other.size_ ? -1 : 1);
501 return lhs.compare(rhs) == 0;
504 return lhs.compare(rhs) != 0;
507 return lhs.compare(rhs) < 0;
510 return lhs.compare(rhs) <= 0;
513 return lhs.compare(rhs) > 0;
516 return lhs.compare(rhs) >= 0;
523template <
typename T>
struct is_char : std::false_type {};
524template <>
struct is_char<char> : std::true_type {};
535template <
typename Char, FMT_ENABLE_IF(is_
char<Char>::value)>
539template <
typename Char,
typename Traits,
typename Alloc>
544template <
typename Char>
549template <
typename Char,
554template <
typename S, FMT_ENABLE_IF(is_compile_
string<S>::value)>
566struct is_string : std::is_class<decltype(to_string_view(std::declval<S>()))> {
572 using type =
typename result::value_type;
599template <
typename T,
typename Char>
602#define FMT_TYPE_CONSTANT(Type, constant) \
603 template <typename Char> \
604 struct type_constant<Type, Char> \
605 : std::integral_constant<type, type::constant> {}
653template <
typename Char,
typename ErrorHandler = detail::error_handler>
668 : ErrorHandler(eh), format_str_(format_str), next_arg_id_(
next_arg_id) {}
675 return format_str_.
begin();
693 if (next_arg_id_ < 0) {
694 on_error(
"cannot switch from manual to automatic argument indexing");
697 int id = next_arg_id_++;
707 if (next_arg_id_ > 0) {
708 on_error(
"cannot switch from automatic to manual argument indexing");
718 ErrorHandler::on_error(message);
728template <
typename Char,
typename ErrorHandler = detail::error_handler>
742 constexpr auto num_args() const ->
int {
return num_args_; }
747 if (
id >= num_args_) this->
on_error(
"argument not found");
753 if (
id >= num_args_) this->
on_error(
"argument not found");
759 this->
on_error(
"width/precision is not integer");
764template <
typename Char,
typename ErrorHandler>
770 using context = detail::compile_parse_context<Char, ErrorHandler>;
771 if (
id >=
static_cast<context*
>(
this)->num_args())
776template <
typename Char,
typename ErrorHandler>
780 using context = detail::compile_parse_context<Char, ErrorHandler>;
790template <
typename T,
typename Char =
char,
typename Enable =
void>
798template <
typename T,
typename Context>
800 std::is_constructible<typename Context::template formatter_type<T>>;
804template <
typename Char>
811template <
typename Context,
typename T>
813 ->
decltype(
typename Context::template formatter_type<T>().format(
814 std::declval<const T&>(), std::declval<Context&>()),
818template <
typename Context>
822template <
typename T,
typename Context>
824 return has_const_formatter_impl<Context>(
static_cast<T*
>(
nullptr));
828template <
typename Container>
831 using base = std::back_insert_iterator<Container>;
832 struct accessor : base {
833 accessor(base
b) : base(
b) {}
834 using base::container;
836 return *accessor(it).container;
839template <
typename Char,
typename InputIt,
typename OutputIt>
842 while (begin !=
end) *out++ =
static_cast<Char
>(*begin++);
846template <
typename Char,
typename T,
typename U,
852 memcpy(out, begin,
size *
sizeof(U));
871 buffer(
size_t sz) noexcept : size_(sz), capacity_(sz) {}
874 : ptr_(p), size_(sz), capacity_(cap) {}
882 capacity_ = buf_capacity;
895 auto begin() noexcept -> T* {
return ptr_; }
896 auto end() noexcept -> T* {
return ptr_ + size_; }
898 auto begin() const noexcept -> const T* {
return ptr_; }
899 auto end() const noexcept -> const T* {
return ptr_ + size_; }
902 constexpr auto size() const noexcept ->
size_t {
return size_; }
905 constexpr auto capacity() const noexcept ->
size_t {
return capacity_; }
920 size_ =
count <= capacity_ ?
count : capacity_;
928 if (new_capacity > capacity_)
grow(new_capacity);
933 ptr_[size_++] =
value;
942 template <
typename Idx>
950 auto count() const ->
size_t {
return 0; }
961 auto count() const ->
size_t {
return count_; }
963 size_t n = limit_ > count_ ? limit_ - count_ : 0;
970template <
typename OutputIt,
typename T,
typename Traits = buffer_traits>
974 enum { buffer_size = 256 };
975 T data_[buffer_size];
979 if (this->
size() == buffer_size)
flush();
985 out_ = copy_str<T>(data_, data_ + this->
limit(
size), out_);
990 : Traits(n),
buffer<T>(data_, 0, buffer_size), out_(
out) {}
992 : Traits(other),
buffer<T>(data_, 0, buffer_size), out_(other.out_) {}
1002template <
typename T>
1008 enum { buffer_size = 256 };
1009 T data_[buffer_size];
1018 if (this->
data() == out_) {
1020 this->
set(data_, buffer_size);
1032 if (this->
data() != out_) {
1033 this->
set(data_, buffer_size);
1059template <
typename Container>
1062 typename Container::value_type>>
1063 final :
public buffer<typename Container::value_type> {
1065 Container& container_;
1079 auto out() -> std::back_insert_iterator<Container> {
1080 return std::back_inserter(container_);
1087 enum { buffer_size = 256 };
1088 T data_[buffer_size];
1093 if (this->
size() != buffer_size)
return;
1094 count_ += this->
size();
1104template <
typename T>
1106 std::back_insert_iterator<buffer<T>>>;
1109template <
typename T,
typename OutputIt>
1114template <
typename Buffer>
1122template <
typename T,
typename Char =
char,
typename Enable =
void>
1128template <
typename T,
typename Char>
1130#ifdef FMT_DEPRECATED_OSTREAM
1131 std::is_constructible<fallback_formatter<T, Char>>;
1149template <
typename T,
typename Char,
size_t NUM_ARGS,
size_t NUM_NAMED_ARGS>
1153 T
args_[1 + (NUM_ARGS != 0 ? NUM_ARGS : +1)];
1156 template <
typename... U>
1163template <
typename T,
typename Char,
size_t NUM_ARGS>
1168 template <
typename... U>
1176template <
typename Char>
1182template <
typename T,
typename Char>
1185template <
typename Char,
typename T,
typename... Tail,
1188 int named_arg_count,
const T&,
const Tail&... args) {
1192template <
typename Char,
typename T,
typename... Tail,
1195 int named_arg_count,
const T&
arg,
const Tail&... args) {
1196 named_args[named_arg_count++] = {
arg.name, arg_count};
1200template <
typename... Args>
1204template <
bool B = false>
constexpr auto count() ->
size_t {
return B ? 1 : 0; }
1205template <
bool B1,
bool B2,
bool... Tail>
constexpr auto count() ->
size_t {
1206 return (B1 ? 1 : 0) +
count<B2, Tail...>();
1210 return count<is_named_arg<Args>::value...>();
1213template <
typename... Args>
1215 return count<is_statically_named_arg<Args>::value...>();
1240template <
typename Context>
class value {
1280 string.data = val.
data();
1281 string.size = val.
size();
1289 custom.value =
const_cast<value_type*
>(&val);
1293 custom.format = format_custom_arg<
1296 typename Context::template formatter_type<value_type>,
1306 template <
typename T,
typename Formatter>
1307 static void format_custom_arg(
void*
arg,
1308 typename Context::parse_context_type& parse_ctx,
1310 auto f = Formatter();
1311 parse_ctx.advance_to(f.parse(parse_ctx));
1312 using qualified_type =
1314 ctx.advance_to(f.format(*
static_cast<qualified_type*
>(
arg), ctx));
1318template <
typename Context,
typename T>
1327#ifdef __cpp_lib_byte
1328inline auto format_as(std::byte
b) ->
unsigned char {
1329 return static_cast<unsigned char>(
b);
1334 template <
typename U,
typename V =
decltype(
format_as(U())),
1335 FMT_ENABLE_IF(std::is_enum<U>::value&& std::is_integral<V>::value)>
1336 static auto check(U*) -> std::true_type;
1337 static auto check(...) -> std::false_type;
1364 ->
unsigned long long {
1375 template <
typename T, FMT_ENABLE_IF(std::is_same<T,
char>::value ||
1376 std::is_same<T,
char_type>::value)>
1380 template <
typename T, enable_if_t<(std::is_same<T,
wchar_t>::value ||
1382 std::is_same<T,
char8_t>::value ||
1384 std::is_same<T,
char16_t>::value ||
1385 std::is_same<T,
char32_t>::value) &&
1386 !std::is_same<T,
char_type>::value,
1404 template <
typename T,
1411 template <
typename T,
1417 template <
typename T,
1426 template <
typename T,
1450 std::is_pointer<T>::value || std::is_member_pointer<T>::value ||
1452 (std::is_convertible<const T&, const void*>::value &&
1453 !std::is_convertible<const T&, const char_type*>::value &&
1459 template <
typename T, std::size_t N,
1465 template <
typename T,
1467 std::is_enum<T>::value&& std::is_convertible<T, int>::value &&
1471 ->
decltype(std::declval<arg_mapper>().map(
1476 template <
typename T, FMT_ENABLE_IF(has_format_as<T>::value &&
1477 !has_formatter<T, Context>::value)>
1479 ->
decltype(std::declval<arg_mapper>().map(
format_as(T()))) {
1483 template <
typename T,
typename U = remove_cvref_t<T>>
1486 !std::is_const<remove_reference_t<T>>::value ||
1487 has_fallback_formatter<U, char_type>::value> {};
1489#if (FMT_MSC_VERSION != 0 && FMT_MSC_VERSION < 1910) || \
1490 FMT_ICC_VERSION != 0 || defined(__NVCC__)
1496 template <
typename T, FMT_ENABLE_IF(formattable<T>::value)>
1500 template <
typename T, FMT_ENABLE_IF(!formattable<T>::value)>
1506 template <
typename T,
typename U = remove_cvref_t<T>,
1507 FMT_ENABLE_IF(!is_
string<U>::value && !is_
char<U>::value &&
1508 !std::is_array<U>::value &&
1509 !std::is_po
inter<U>::value &&
1510 !has_format_as<U>::value &&
1511 (has_formatter<U, Context>::value ||
1512 has_fallback_formatter<U,
char_type>::value))>
1514 ->
decltype(this->
do_map(std::forward<T>(val))) {
1515 return do_map(std::forward<T>(val));
1518 template <
typename T, FMT_ENABLE_IF(is_named_arg<T>::value)>
1528template <
typename T,
typename Context>
1531 typename Context::char_type>;
1543class appender :
public std::back_insert_iterator<detail::buffer<char>> {
1544 using base = std::back_insert_iterator<detail::buffer<char>>;
1546 template <
typename T>
1552 using std::back_insert_iterator<detail::buffer<char>>::back_insert_iterator;
1564 detail::value<Context> value_;
1567 template <
typename ContextType,
typename T>
1571 template <
typename Visitor,
typename Ctx>
1574 ->
decltype(vis(0));
1579 using char_type =
typename Context::char_type;
1581 template <
typename T,
typename Char,
size_t NUM_ARGS,
size_t NUM_NAMED_ARGS>
1585 : value_(args,
size) {}
1590 explicit handle(detail::custom_value<Context> custom) : custom_(custom) {}
1592 void format(
typename Context::parse_context_type& parse_ctx,
1593 Context& ctx)
const {
1594 custom_.format(custom_.value, parse_ctx, ctx);
1598 detail::custom_value<Context> custom_;
1603 constexpr explicit operator bool() const noexcept {
1604 return type_ != detail::type::none_type;
1622template <
typename Visitor,
typename Context>
1625 switch (
arg.type_) {
1626 case detail::type::none_type:
1628 case detail::type::int_type:
1629 return vis(
arg.value_.int_value);
1630 case detail::type::uint_type:
1631 return vis(
arg.value_.uint_value);
1632 case detail::type::long_long_type:
1633 return vis(
arg.value_.long_long_value);
1634 case detail::type::ulong_long_type:
1635 return vis(
arg.value_.ulong_long_value);
1636 case detail::type::int128_type:
1638 case detail::type::uint128_type:
1640 case detail::type::bool_type:
1641 return vis(
arg.value_.bool_value);
1642 case detail::type::char_type:
1643 return vis(
arg.value_.char_value);
1644 case detail::type::float_type:
1645 return vis(
arg.value_.float_value);
1646 case detail::type::double_type:
1647 return vis(
arg.value_.double_value);
1648 case detail::type::long_double_type:
1649 return vis(
arg.value_.long_double_value);
1650 case detail::type::cstring_type:
1651 return vis(
arg.value_.string.data);
1652 case detail::type::string_type:
1654 return vis(sv(
arg.value_.string.data,
arg.value_.string.size));
1655 case detail::type::pointer_type:
1656 return vis(
arg.value_.pointer);
1657 case detail::type::custom_type:
1665template <
typename Char,
typename InputIt>
1671template <
typename Char,
typename R,
typename OutputIt>
1673 return detail::copy_str<Char>(rng.begin(), rng.end(), out);
1676#if FMT_GCC_VERSION && FMT_GCC_VERSION < 500
1678template <
typename... Ts>
struct void_t_impl {
using type = void; };
1679template <
typename... Ts>
1680using void_t =
typename detail::void_t_impl<Ts...>
::type;
1685template <
typename It,
typename T,
typename Enable =
void>
1688template <
typename It,
typename T>
1692 decltype(*std::declval<It>() = std::declval<T>())>>
1693 : std::true_type {};
1695template <
typename OutputIt>
1697template <
typename Container>
1699 : std::true_type {};
1701template <
typename OutputIt>
1703template <
typename Container>
1712 const void* locale_;
1716 template <
typename Locale>
explicit locale_ref(
const Locale& loc);
1718 explicit operator bool() const noexcept {
return locale_ !=
nullptr; }
1720 template <
typename Locale>
auto get() const -> Locale;
1727template <
typename Context,
typename Arg,
typename... Args>
1733template <
typename Context,
typename T>
1735#if FMT_GCC_VERSION && FMT_GCC_VERSION >= 1300
1736# pragma GCC diagnostic push
1737# pragma GCC diagnostic ignored "-Wdangling-reference"
1740#if FMT_GCC_VERSION && FMT_GCC_VERSION >= 1300
1741# pragma GCC diagnostic pop
1744 constexpr bool formattable_char =
1746 static_assert(formattable_char,
"Mixing character types is disallowed.");
1748 constexpr bool formattable_const =
1750 static_assert(formattable_const,
"Cannot format a const argument.");
1756 constexpr bool formattable_pointer =
1758 static_assert(formattable_pointer,
1759 "Formatting of non-void pointers is disallowed.");
1761 constexpr bool formattable =
1765 "Cannot format an argument. To make type T formattable provide a "
1766 "formatter<T> specialization: https://fmt.dev/latest/api.html#udt");
1770template <
typename Context,
typename T>
1774 arg.value_ = make_value<Context>(
value);
1781template <
bool IS_PACKED,
typename Context,
type,
typename T,
1784 return make_value<Context>(val);
1787template <
bool IS_PACKED,
typename Context,
type,
typename T,
1790 return make_arg<Context>(
value);
1803 detail::locale_ref loc_;
1820 detail::locale_ref loc = detail::locale_ref())
1821 : out_(out), args_(ctx_args), loc_(loc) {}
1842 if (!detail::is_back_insert_iterator<iterator>()) out_ = it;
1848template <
typename Char>
1854#define FMT_BUFFER_CONTEXT(Char) \
1855 basic_format_context<detail::buffer_appender<Char>, Char>
1857template <
typename T,
typename Char =
char>
1859 !std::is_base_of<detail::unformattable,
1860 decltype(detail::arg_mapper<buffer_context<Char>>().
map(
1861 std::declval<T>()))>
::value &&
1862 !detail::has_fallback_formatter<T, Char>::value>;
1871template <
typename Context,
typename... Args>
1879 static const size_t num_args =
sizeof...(Args);
1886 detail::arg_data<value_type,
typename Context::char_type, num_args,
1892 static constexpr unsigned long long desc =
1895 (num_named_args != 0
1900 template <
typename... T>
1939template <
typename Char,
typename T>
1940inline auto arg(
const Char*
name,
const T&
arg) -> detail::named_arg<Char, T> {
1941 static_assert(!detail::is_named_arg<T>(),
"nested named arguments");
1965 unsigned long long desc_;
1976 constexpr auto is_packed() const ->
bool {
1979 auto has_named_args() const ->
bool {
1986 return static_cast<detail::type>((desc_ >> shift) & mask);
1990 const detail::value<Context>* values)
1991 : desc_(desc), values_(values) {}
1993 : desc_(desc), args_(args) {}
2003 template <
typename... Args>
2007 store.data_.args()) {}
2032 if (
id < max_size())
arg = args_[id];
2037 if (
arg.type_ == detail::type::none_type)
return arg;
2038 arg.value_ = values_[id];
2042 template <
typename Char>
2044 int id = get_id(
name);
2048 template <
typename Char>
2050 if (!has_named_args())
return -1;
2051 const auto& named_args =
2052 (is_packed() ? values_[-1] : args_[-1].value_).named_args;
2053 for (
size_t i = 0; i < named_args.size; ++i) {
2054 if (named_args.data[i].name ==
name)
return named_args.data[i].id;
2061 return static_cast<int>(is_packed() ? max_packed
2075#if FMT_GCC_VERSION && FMT_GCC_VERSION < 903
2076# define FMT_ENUM_UNDERLYING_TYPE(type)
2078# define FMT_ENUM_UNDERLYING_TYPE(type) : type
2095 enum { max_size = 4 };
2096 Char data_[max_size] = {Char(
' '), Char(0), Char(0), Char(0)};
2097 unsigned char size_ = 1;
2103 for (
size_t i = 0; i <
size; ++i) data_[i] = s[i];
2104 size_ =
static_cast<unsigned char>(
size);
2107 constexpr auto size() const ->
size_t {
return size_; }
2108 constexpr auto data() const -> const Char* {
return data_; }
2112 return data_[
index];
2195template <
typename Char>
2213 : specs_(other.specs_) {}
2224 if (specs_.
align == align::none) specs_.
align = align::numeric;
2225 specs_.
fill[0] = Char(
'0');
2239template <
typename ParseContext>
2241 :
public specs_setter<typename ParseContext::char_type> {
2251 specs_(other.specs_),
2252 context_(other.context_) {}
2255 specs_.width_ref = make_arg_ref(arg_id);
2259 specs_.precision_ref = make_arg_ref(arg_id);
2263 context_.on_error(message);
2268 ParseContext& context_;
2272 FMT_CONSTEXPR auto make_arg_ref(
int arg_id) -> arg_ref_type {
2273 context_.check_arg_id(arg_id);
2274 context_.check_dynamic_spec(arg_id);
2275 return arg_ref_type(arg_id);
2279 int arg_id = context_.next_arg_id();
2280 context_.check_dynamic_spec(arg_id);
2281 return arg_ref_type(arg_id);
2286 context_.check_arg_id(arg_id);
2288 context_.begin(),
to_unsigned(context_.end() - context_.begin()));
2289 return arg_ref_type(arg_id);
2294 return (
c >=
'a' &&
c <=
'z') || (
c >=
'A' &&
c <=
'Z');
2298template <
typename Char, FMT_ENABLE_IF(std::is_
integral<Char>::value)>
2302template <
typename Char, FMT_ENABLE_IF(std::is_enum<Char>::value)>
2308 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"
2309 [
static_cast<unsigned char>(
c) >> 3];
2312template <
typename Char>
2324template <
bool IS_CONSTEXPR,
typename T,
typename Ptr = const T*>
2327 if (*out ==
value)
return true;
2334 const char*& out) ->
bool {
2335 out =
static_cast<const char*
>(
2337 return out !=
nullptr;
2342template <
typename Char>
2344 int error_value)
noexcept ->
int {
2345 FMT_ASSERT(begin !=
end &&
'0' <= *begin && *begin <=
'9',
"");
2346 unsigned value = 0, prev = 0;
2352 }
while (p !=
end &&
'0' <= *p && *p <=
'9');
2353 auto num_digits = p - begin;
2356 return static_cast<int>(
value);
2360 prev * 10ull + unsigned(p[-1] -
'0') <=
max
2361 ?
static_cast<int>(
value)
2366template <
typename Char,
typename Handler>
2368 Handler&& handler) ->
const Char* {
2370 auto align = align::none;
2372 if (
end - p <= 0) p = begin;
2376 align = align::left;
2379 align = align::right;
2382 align = align::center;
2387 if (
align != align::none) {
2391 return handler.on_error(
"invalid fill character '{'"), begin;
2396 handler.on_align(
align);
2398 }
else if (p == begin) {
2407 return (
'a' <=
c &&
c <=
'z') || (
'A' <=
c &&
c <=
'Z') ||
'_' ==
c;
2410template <
typename Char,
typename IDHandler>
2412 IDHandler&& handler) ->
const Char* {
2415 if (
c >=
'0' &&
c <=
'9') {
2422 if (begin ==
end || (*begin !=
'}' && *begin !=
':'))
2423 handler.on_error(
"invalid format string");
2429 handler.on_error(
"invalid format string");
2440template <
typename Char,
typename IDHandler>
2442 IDHandler&& handler) ->
const Char* {
2449template <
typename Char,
typename Handler>
2451 Handler&& handler) ->
const Char* {
2452 using detail::auto_id;
2453 struct width_adapter {
2459 handler.on_dynamic_width(
id);
2462 if (message) handler.on_error(message);
2467 if (
'0' <= *begin && *begin <=
'9') {
2470 handler.on_width(width);
2472 handler.on_error(
"number is too big");
2473 }
else if (*begin ==
'{') {
2476 if (begin ==
end || *begin !=
'}')
2477 return handler.on_error(
"invalid format string"), begin;
2483template <
typename Char,
typename Handler>
2485 Handler&& handler) ->
const Char* {
2486 using detail::auto_id;
2487 struct precision_adapter {
2493 handler.on_dynamic_precision(
id);
2496 if (message) handler.on_error(message);
2501 auto c = begin !=
end ? *begin : Char();
2502 if (
'0' <=
c &&
c <=
'9') {
2504 if (precision != -1)
2505 handler.on_precision(precision);
2507 handler.on_error(
"number is too big");
2508 }
else if (
c ==
'{') {
2512 if (begin ==
end || *begin++ !=
'}')
2513 return handler.on_error(
"invalid format string"), begin;
2515 return handler.on_error(
"missing precision specifier"), begin;
2517 handler.end_precision();
2521template <
typename Char>
2567template <
typename Char,
typename SpecHandler>
2570 SpecHandler&& handler)
2576 handler.on_error(
"invalid type specifier");
2577 handler.on_type(
type);
2581 if (begin ==
end)
return begin;
2584 if (begin ==
end)
return begin;
2589 handler.on_sign(sign::plus);
2593 handler.on_sign(sign::minus);
2597 handler.on_sign(sign::space);
2603 if (begin ==
end)
return begin;
2605 if (*begin ==
'#') {
2607 if (++begin ==
end)
return begin;
2611 if (*begin ==
'0') {
2613 if (++begin ==
end)
return begin;
2617 if (begin ==
end)
return begin;
2620 if (*begin ==
'.') {
2622 if (begin ==
end)
return begin;
2625 if (*begin ==
'L') {
2626 handler.on_localized();
2631 if (begin !=
end && *begin !=
'}') {
2634 handler.on_error(
"invalid type specifier");
2635 handler.on_type(
type);
2640template <
typename Char,
typename Handler>
2642 Handler&& handler) ->
const Char* {
2650 arg_id = handler.on_arg_id(
id);
2653 if (message) handler.on_error(message);
2658 if (begin ==
end)
return handler.on_error(
"invalid format string"),
end;
2659 if (*begin ==
'}') {
2660 handler.on_replacement_field(handler.on_arg_id(), begin);
2661 }
else if (*begin ==
'{') {
2662 handler.on_text(begin, begin + 1);
2664 auto adapter = id_adapter{handler, 0};
2666 Char
c = begin !=
end ? *begin : Char();
2668 handler.on_replacement_field(adapter.arg_id, begin);
2669 }
else if (
c ==
':') {
2670 begin = handler.on_format_specs(adapter.arg_id, begin + 1,
end);
2671 if (begin ==
end || *begin !=
'}')
2672 return handler.on_error(
"unknown format specifier"),
end;
2674 return handler.on_error(
"missing '}' in format string"),
end;
2680template <
bool IS_CONSTEXPR,
typename Char,
typename Handler>
2686 auto begin = format_str.
data();
2687 auto end = begin + format_str.
size();
2688 if (
end - begin < 32) {
2690 const Char* p = begin;
2694 handler.on_text(begin, p - 1);
2696 }
else if (
c ==
'}') {
2697 if (p ==
end || *p !=
'}')
2698 return handler.on_error(
"unmatched '}' in format string");
2699 handler.on_text(begin, p);
2703 handler.on_text(begin,
end);
2708 if (
from == to)
return;
2710 const Char* p =
nullptr;
2711 if (!find<IS_CONSTEXPR>(
from, to, Char(
'}'), p))
2712 return handler_.on_text(
from, to);
2714 if (p == to || *p !=
'}')
2715 return handler_.
on_error(
"unmatched '}' in format string");
2716 handler_.on_text(
from, p);
2721 }
write = {handler};
2722 while (begin !=
end) {
2725 const Char* p = begin;
2726 if (*begin !=
'{' && !find<IS_CONSTEXPR>(begin + 1,
end, Char(
'{'), p))
2740template <
typename T,
typename ParseContext>
2742 ->
decltype(ctx.begin()) {
2743 using char_type =
typename ParseContext::char_type;
2753 return f.parse(ctx);
2756template <
typename ErrorHandler>
2758 ErrorHandler&& eh) {
2760 eh.on_error(
"invalid type specifier");
2764template <
typename Char,
typename ErrorHandler = error_handler>
2766 ErrorHandler&& eh = {}) ->
bool {
2773 if (specs.
align == align::numeric || specs.
sign != sign::none || specs.
alt)
2774 eh.on_error(
"invalid format specifier for char");
2796template <
typename ErrorHandler = error_handler,
typename Char>
2798 ErrorHandler&& eh = {})
2803 switch (specs.
type) {
2834 eh.on_error(
"invalid type specifier");
2840template <
typename ErrorHandler = error_handler>
2842 ErrorHandler&& eh = {}) ->
bool {
2850template <
typename ErrorHandler = error_handler>
2852 ErrorHandler&& eh = {}) {
2855 eh.on_error(
"invalid type specifier");
2858template <
typename ErrorHandler>
2860 ErrorHandler&& eh) {
2862 eh.on_error(
"invalid type specifier");
2873 this->on_error(
"format specifier requires numeric argument");
2878 : Handler(handler), arg_type_(arg_type) {}
2881 if (
align == align::numeric) require_numeric_argument();
2882 Handler::on_align(
align);
2886 require_numeric_argument();
2890 this->on_error(
"format specifier requires signed argument");
2892 Handler::on_sign(s);
2896 require_numeric_argument();
2901 require_numeric_argument();
2902 Handler::on_localized();
2906 require_numeric_argument();
2912 this->on_error(
"precision not allowed for this argument type");
2918#if FMT_USE_NONTYPE_TEMPLATE_ARGS
2919template <
int N,
typename T,
typename... Args,
typename Char>
2921 if constexpr (detail::is_statically_named_arg<T>()) {
2922 if (
name == T::name)
return N;
2924 if constexpr (
sizeof...(Args) > 0)
2931template <
typename... Args,
typename Char>
2933#if FMT_USE_NONTYPE_TEMPLATE_ARGS
2934 if constexpr (
sizeof...(Args) > 0)
2941template <
typename Char,
typename ErrorHandler,
typename... Args>
2948 static constexpr int num_args =
sizeof...(Args);
2954 parse_func parse_funcs_[num_args > 0 ?
static_cast<size_t>(num_args) : 1];
2955 type types_[num_args > 0 ?
static_cast<size_t>(num_args) : 1];
2960 : context_(format_str, num_args, types_, eh),
2974#if FMT_USE_NONTYPE_TEMPLATE_ARGS
2980 on_error(
"compile-time checks for named arguments require C++20 support");
2991 return id >= 0 &&
id < num_args ? parse_funcs_[id](context_) : begin;
3002#ifdef FMT_ENFORCE_COMPILE_STRING
3004 "FMT_ENFORCE_COMPILE_STRING requires all format strings to use "
3008template <
typename... Args,
typename S,
3015 (parse_format_string<true>(s, checker(s, {})),
true);
3019template <
typename Char>
3033template <
typename T,
typename Char>
3036 detail::type::custom_type>> {
3038 detail::dynamic_format_specs<Char> specs_;
3043 template <
typename ParseContext>
3045 auto begin = ctx.begin(),
end = ctx.end();
3046 if (begin ==
end)
return begin;
3047 using handler_type = detail::dynamic_specs_handler<ParseContext>;
3048 auto type = detail::type_constant<T, Char>::value;
3050 detail::specs_checker<handler_type>(handler_type(specs_, ctx),
type);
3052 auto eh = ctx.error_handler();
3054 case detail::type::none_type:
3057 case detail::type::bool_type:
3063 case detail::type::int_type:
3064 case detail::type::uint_type:
3065 case detail::type::long_long_type:
3066 case detail::type::ulong_long_type:
3067 case detail::type::int128_type:
3068 case detail::type::uint128_type:
3071 case detail::type::char_type:
3074 case detail::type::float_type:
3080 case detail::type::double_type:
3084 FMT_ASSERT(
false,
"double support disabled");
3086 case detail::type::long_double_type:
3090 FMT_ASSERT(
false,
"long double support disabled");
3092 case detail::type::cstring_type:
3095 case detail::type::string_type:
3098 case detail::type::pointer_type:
3101 case detail::type::custom_type:
3109 template <detail::type U = detail::type_constant<T, Char>::value,
3111 U == detail::type::cstring_type ||
3112 U == detail::type::char_type),
3118 template <
typename FormatContext>
3120 ->
decltype(ctx.out());
3123#define FMT_FORMAT_AS(Type, Base) \
3124 template <typename Char> \
3125 struct formatter<Type, Char> : formatter<Base, Char> { \
3126 template <typename FormatContext> \
3127 auto format(Type const& val, FormatContext& ctx) const \
3128 -> decltype(ctx.out()) { \
3129 return formatter<Base, Char>::format(static_cast<Base>(val), ctx); \
3152 template <
typename S,
3158 (std::is_base_of<detail::view, remove_reference_t<Args>>
::value &&
3159 std::is_reference<Args>::value)...>() == 0,
3160 "passing views as lvalues is disallowed");
3161#ifdef FMT_HAS_CONSTEVAL
3163 detail::count_statically_named_args<Args...>()) {
3164 using checker = detail::format_string_checker<Char, detail::error_handler,
3166 detail::parse_format_string<true>(str_, checker(s, {}));
3177#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
3182template <
typename... Args>
3210template <
typename... T>
3217template <
typename OutputIt,
3218 FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
3221 auto&& buf = get_buffer<char>(out);
3238template <
typename OutputIt,
typename... T,
3239 FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
3252template <
typename OutputIt,
typename... T,
3253 FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
3256 using traits = detail::fixed_buffer_traits;
3257 auto buf = detail::iterator_buffer<OutputIt, char, traits>(out, n);
3259 return {buf.out(), buf.count()};
3270template <
typename OutputIt,
typename... T,
3271 FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
3278template <
typename... T>
3280 T&&... args) ->
size_t {
3281 auto buf = detail::counting_buffer<>();
3299template <
typename... T>
3316template <
typename... T>
3327#ifdef FMT_HEADER_ONLY
internal::enable_if< internal::valid_indexed_view_overload< RowIndices, ColIndices >::value &&internal::traits< typenameEIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::ReturnAsIndexedView, typenameEIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::type operator()(const RowIndices &rowIndices, const ColIndices &colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST
Definition: IndexedViewMethods.h:73
you may not use this file except in compliance with the License You may obtain a copy of the License at software distributed under the License is distributed on an AS IS WITHOUT WARRANTIES OR CONDITIONS OF ANY either express or implied See the License for the specific language governing permissions and limitations under the License LLVM Exceptions to the Apache License As an if
Definition: ThirdPartyNotices.txt:289
then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file
Definition: ThirdPartyNotices.txt:192
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation and configuration files Object form shall mean any form resulting from mechanical transformation or translation of a Source including but not limited to compiled object generated and conversions to other media types Work shall mean the work of whether in Source or Object made available under the as indicated by a copyright notice that is included in or attached to the whether in Source or Object that is based or other modifications as a an original work of authorship For the purposes of this Derivative Works shall not include works that remain separable from
Definition: ThirdPartyNotices.txt:128
appender(base it) noexcept
Definition: core.h:1553
auto operator++() noexcept -> appender &
Definition: core.h:1556
auto operator++(int) noexcept -> appender
Definition: core.h:1557
FMT_UNCHECKED_ITERATOR(appender)
friend auto get_buffer(appender out) -> detail::buffer< char > &
Definition: core.h:1547
basic_format_context(const basic_format_context &)=delete
OutputIt iterator
Definition: core.h:1806
FMT_CONSTEXPR auto locale() -> detail::locale_ref
Definition: core.h:1845
FMT_CONSTEXPR auto out() -> iterator
Definition: core.h:1838
FMT_CONSTEXPR auto arg(basic_string_view< char_type > name) -> format_arg
Definition: core.h:1824
Char char_type
The character type for the output.
Definition: core.h:1798
FMT_CONSTEXPR auto arg_id(basic_string_view< char_type > name) -> int
Definition: core.h:1827
void on_error(const char *message)
Definition: core.h:1835
FMT_CONSTEXPR auto error_handler() -> detail::error_handler
Definition: core.h:1834
constexpr auto arg(int id) const -> format_arg
Definition: core.h:1823
auto args() const -> const basic_format_args< basic_format_context > &
Definition: core.h:1830
void advance_to(iterator it)
Definition: core.h:1841
constexpr basic_format_context(OutputIt out, basic_format_args< basic_format_context > ctx_args, detail::locale_ref loc=detail::locale_ref())
Constructs a basic_format_context object.
Definition: core.h:1818
basic_format_context(basic_format_context &&)=default
void operator=(const basic_format_context &)=delete
\rst Parsing context consisting of a format string range being parsed and an argument counter for aut...
Definition: core.h:654
FMT_CONSTEXPR void check_dynamic_spec(int arg_id)
FMT_CONSTEXPR void check_arg_id(basic_string_view< Char >)
Definition: core.h:714
constexpr auto error_handler() const -> ErrorHandler
Definition: core.h:721
FMT_CONSTEXPR void on_error(const char *message)
Definition: core.h:717
FMT_CONSTEXPR void check_arg_id(int id)
Reports an error if using the automatic argument indexing; otherwise switches to the manual indexing.
Definition: core.h:706
constexpr auto end() const noexcept -> iterator
Returns an iterator past the end of the format string range being parsed.
Definition: core.h:681
Char char_type
Definition: core.h:662
typename basic_string_view< Char >::iterator iterator
Definition: core.h:663
FMT_CONSTEXPR auto next_arg_id() -> int
Reports an error if using the manual argument indexing; otherwise returns the next argument index and...
Definition: core.h:692
FMT_CONSTEXPR void advance_to(iterator it)
Advances the begin iterator to it.
Definition: core.h:684
constexpr auto begin() const noexcept -> iterator
Returns an iterator to the beginning of the format string range being parsed.
Definition: core.h:674
constexpr basic_format_parse_context(basic_string_view< Char > format_str, ErrorHandler eh={}, int next_arg_id=0)
Definition: core.h:665
An implementation of std::basic_string_view for pre-C++17.
Definition: core.h:430
FMT_CONSTEXPR basic_string_view(const std::basic_string< Char, Traits, Alloc > &s) noexcept
Constructs a string reference from a std::basic_string object.
Definition: core.h:462
constexpr auto end() const noexcept -> iterator
Definition: core.h:478
const Char * iterator
Definition: core.h:437
constexpr auto size() const noexcept -> size_t
Returns the string size.
Definition: core.h:475
constexpr auto data() const noexcept -> const Char *
Returns a pointer to the string data.
Definition: core.h:472
FMT_CONSTEXPR_CHAR_TRAITS friend auto operator==(basic_string_view lhs, basic_string_view rhs) -> bool
Definition: core.h:498
friend auto operator>(basic_string_view lhs, basic_string_view rhs) -> bool
Definition: core.h:512
constexpr auto begin() const noexcept -> iterator
Definition: core.h:477
friend auto operator<(basic_string_view lhs, basic_string_view rhs) -> bool
Definition: core.h:506
Char value_type
Definition: core.h:436
FMT_CONSTEXPR basic_string_view(S s) noexcept
Definition: core.h:468
friend auto operator<=(basic_string_view lhs, basic_string_view rhs) -> bool
Definition: core.h:509
FMT_CONSTEXPR void remove_prefix(size_t n) noexcept
Definition: core.h:484
FMT_CONSTEXPR_CHAR_TRAITS FMT_INLINE basic_string_view(const Char *s)
\rst Constructs a string reference object from a C string computing the size with std::char_traits<Ch...
Definition: core.h:453
friend auto operator!=(basic_string_view lhs, basic_string_view rhs) -> bool
Definition: core.h:503
constexpr auto operator[](size_t pos) const noexcept -> const Char &
Definition: core.h:480
constexpr basic_string_view(const Char *s, size_t count) noexcept
Constructs a string reference object from a C string and a size.
Definition: core.h:442
constexpr basic_string_view() noexcept
Definition: core.h:439
friend auto operator>=(basic_string_view lhs, basic_string_view rhs) -> bool
Definition: core.h:515
FMT_CONSTEXPR_CHAR_TRAITS auto compare(basic_string_view other) const -> int
Definition: core.h:490
\rst A contiguous memory buffer with an optional growing ability.
Definition: core.h:862
constexpr auto capacity() const noexcept -> size_t
Returns the capacity of this buffer.
Definition: core.h:905
void append(const U *begin, const U *end)
Appends data to the end of the buffer.
FMT_CONSTEXPR20 ~buffer()=default
auto end() noexcept -> T *
Definition: core.h:896
FMT_CONSTEXPR20 void try_reserve(size_t new_capacity)
Definition: core.h:927
buffer(const buffer &)=delete
void clear()
Clears this buffer.
Definition: core.h:914
FMT_CONSTEXPR20 void push_back(const T &value)
Definition: core.h:931
FMT_CONSTEXPR auto data() noexcept -> T *
Returns a pointer to the buffer data.
Definition: core.h:908
auto begin() const noexcept -> const T *
Definition: core.h:898
FMT_CONSTEXPR auto operator[](Idx index) -> T &
Definition: core.h:939
const T & const_reference
Definition: core.h:890
virtual FMT_CONSTEXPR20 void grow(size_t capacity)=0
Increases the buffer capacity to hold at least capacity elements.
T value_type
Definition: core.h:889
auto end() const noexcept -> const T *
Definition: core.h:899
FMT_CONSTEXPR auto operator[](Idx index) const -> const T &
Definition: core.h:943
FMT_CONSTEXPR20 buffer(T *p=nullptr, size_t sz=0, size_t cap=0) noexcept
Definition: core.h:873
FMT_CONSTEXPR20 void try_resize(size_t count)
Definition: core.h:918
FMT_CONSTEXPR auto data() const noexcept -> const T *
Returns a pointer to the buffer data.
Definition: core.h:911
void operator=(const buffer &)=delete
FMT_CONSTEXPR void set(T *buf_data, size_t buf_capacity) noexcept
Sets the buffer data and capacity.
Definition: core.h:880
constexpr auto size() const noexcept -> size_t
Returns the size of this buffer.
Definition: core.h:902
buffer(buffer &&)=default
auto begin() noexcept -> T *
Definition: core.h:895
constexpr auto num_args() const -> int
Definition: core.h:742
FMT_CONSTEXPR void check_arg_id(int id)
Definition: core.h:751
FMT_CONSTEXPR void check_dynamic_spec(int arg_id)
Definition: core.h:757
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:737
FMT_CONSTEXPR auto next_arg_id() -> int
Definition: core.h:745
constexpr auto arg_type(int id) const -> type
Definition: core.h:743
FMT_CONSTEXPR20 void grow(size_t) override
Increases the buffer capacity to hold at least capacity elements.
Definition: core.h:1092
auto count() -> size_t
Definition: core.h:1101
counting_buffer()
Definition: core.h:1099
typename ParseContext::char_type char_type
Definition: core.h:2243
FMT_CONSTEXPR dynamic_specs_handler(const dynamic_specs_handler &other)
Definition: core.h:2249
FMT_CONSTEXPR dynamic_specs_handler(dynamic_format_specs< char_type > &specs, ParseContext &ctx)
Definition: core.h:2245
FMT_CONSTEXPR void on_dynamic_precision(Id arg_id)
Definition: core.h:2258
FMT_CONSTEXPR void on_error(const char *message)
Definition: core.h:2262
FMT_CONSTEXPR void on_dynamic_width(Id arg_id)
Definition: core.h:2254
fixed_buffer_traits(size_t limit)
Definition: core.h:960
auto limit(size_t size) -> size_t
Definition: core.h:962
auto count() const -> size_t
Definition: core.h:961
iterator_buffer(T *out, size_t n=buffer_size)
Definition: core.h:1026
auto count() const -> size_t
Definition: core.h:1043
auto out() -> T *
Definition: core.h:1039
void flush()
Definition: core.h:1016
FMT_CONSTEXPR20 void grow(size_t) override
Increases the buffer capacity to hold at least capacity elements.
Definition: core.h:1012
~iterator_buffer()
Definition: core.h:1037
iterator_buffer(iterator_buffer &&other)
Definition: core.h:1028
iterator_buffer(T *out, size_t=0)
Definition: core.h:1053
auto out() -> T *
Definition: core.h:1055
FMT_CONSTEXPR20 void grow(size_t) override
Increases the buffer capacity to hold at least capacity elements.
Definition: core.h:1050
iterator_buffer(Container &c)
Definition: core.h:1074
FMT_CONSTEXPR20 void grow(size_t capacity) override
Increases the buffer capacity to hold at least capacity elements.
Definition: core.h:1068
iterator_buffer(std::back_insert_iterator< Container > out, size_t=0)
Definition: core.h:1076
auto out() -> std::back_insert_iterator< Container >
Definition: core.h:1079
auto out() -> OutputIt
Definition: core.h:995
iterator_buffer(OutputIt out, size_t n=buffer_size)
Definition: core.h:989
auto count() const -> size_t
Definition: core.h:999
void flush()
Definition: core.h:982
iterator_buffer(iterator_buffer &&other)
Definition: core.h:991
FMT_CONSTEXPR20 void grow(size_t) override
Increases the buffer capacity to hold at least capacity elements.
Definition: core.h:978
~iterator_buffer()
Definition: core.h:993
constexpr locale_ref()
Definition: core.h:1715
auto get() const -> Locale
FMT_CONSTEXPR void end_precision()
Definition: core.h:2910
FMT_CONSTEXPR void on_zero()
Definition: core.h:2905
FMT_CONSTEXPR specs_checker(const Handler &handler, detail::type arg_type)
Definition: core.h:2877
FMT_CONSTEXPR void on_align(align_t align)
Definition: core.h:2880
FMT_CONSTEXPR void on_hash()
Definition: core.h:2895
FMT_CONSTEXPR void on_sign(sign_t s)
Definition: core.h:2885
FMT_CONSTEXPR void on_localized()
Definition: core.h:2900
FMT_CONSTEXPR void on_sign(sign_t s)
Definition: core.h:2219
basic_format_specs< Char > & specs_
Definition: core.h:2206
FMT_CONSTEXPR void on_precision(int precision)
Definition: core.h:2229
FMT_CONSTEXPR specs_setter(basic_format_specs< Char > &specs)
Definition: core.h:2209
FMT_CONSTEXPR void on_hash()
Definition: core.h:2220
FMT_CONSTEXPR void on_zero()
Definition: core.h:2223
FMT_CONSTEXPR void on_localized()
Definition: core.h:2221
FMT_CONSTEXPR specs_setter(const specs_setter &other)
Definition: core.h:2212
FMT_CONSTEXPR void on_width(int width)
Definition: core.h:2228
FMT_CONSTEXPR void end_precision()
Definition: core.h:2232
FMT_CONSTEXPR void on_align(align_t align)
Definition: core.h:2215
FMT_CONSTEXPR void on_type(presentation_type type)
Definition: core.h:2234
FMT_CONSTEXPR void on_fill(basic_string_view< Char > fill)
Definition: core.h:2216
FMT_CONSTEXPR FMT_INLINE value(const char_type *val)
Definition: core.h:1275
long double long_double_value
Definition: core.h:1256
value(unformattable_pointer)
constexpr FMT_INLINE value(char_type val)
Definition: core.h:1274
long long long_long_value
Definition: core.h:1248
const void * pointer
Definition: core.h:1257
constexpr FMT_INLINE value()
Definition: core.h:1263
value(unformattable_char)
constexpr FMT_INLINE value(bool val)
Definition: core.h:1273
constexpr FMT_INLINE value(int val)
Definition: core.h:1264
constexpr FMT_INLINE value(float val)
Definition: core.h:1270
constexpr FMT_INLINE value(unsigned long long val)
Definition: core.h:1267
FMT_INLINE value(const named_arg_info< char_type > *args, size_t size)
Definition: core.h:1284
constexpr FMT_INLINE value(unsigned val)
Definition: core.h:1265
constexpr FMT_INLINE value(long long val)
Definition: core.h:1266
value(unformattable_const)
bool bool_value
Definition: core.h:1252
monostate no_value
Definition: core.h:1245
constexpr FMT_INLINE value(double val)
Definition: core.h:1271
unsigned long long ulong_long_value
Definition: core.h:1249
FMT_INLINE value(uint128_opt val)
Definition: core.h:1269
char_type char_value
Definition: core.h:1253
int128_opt int128_value
Definition: core.h:1250
float float_value
Definition: core.h:1254
typename Context::char_type char_type
Definition: core.h:1242
int int_value
Definition: core.h:1246
FMT_INLINE value(long double val)
Definition: core.h:1272
FMT_INLINE value(const void *val)
Definition: core.h:1283
unsigned uint_value
Definition: core.h:1247
FMT_CONSTEXPR FMT_INLINE value(basic_string_view< char_type > val)
Definition: core.h:1279
FMT_CONSTEXPR FMT_INLINE value(T &val)
Definition: core.h:1287
custom_value< Context > custom
Definition: core.h:1259
named_arg_value< char_type > named_args
Definition: core.h:1260
uint128_opt uint128_value
Definition: core.h:1251
string_value< char_type > string
Definition: core.h:1258
FMT_INLINE value(int128_opt val)
Definition: core.h:1268
double double_value
Definition: core.h:1255
FMT_CONSTEXPR bool is_name_start(Char c)
Definition: core.h:2406
typename std::enable_if< B, T >::type enable_if_t
Definition: core.h:298
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
Definition: core.h:2325
constexpr FMT_INLINE auto const_check(T value) -> T
Definition: core.h:356
#define FMT_ASSERT(condition, message)
Definition: core.h:369
FMT_NODISCARD FMT_INLINE auto format(format_string< T... > fmt, T &&... args) -> std::string
\rst Formats args according to specifications in fmt and returns the result as a string.
Definition: core.h:3211
FMT_CONSTEXPR FMT_INLINE auto visit_format_arg(Visitor &&vis, const basic_format_arg< Context > &arg) -> decltype(vis(0))
\rst Visits an argument dispatching to the appropriate visit method based on the argument type.
Definition: core.h:1623
FMT_CONSTEXPR auto copy_str(InputIt begin, InputIt end, OutputIt out) -> OutputIt
Definition: core.h:840
FMT_CONSTEXPR auto make_arg(T &&value) -> basic_format_arg< Context >
Definition: core.h:1771
FMT_CONSTEXPR FMT_INLINE auto parse_format_specs(const Char *begin, const Char *end, SpecHandler &&handler) -> const Char *
Definition: core.h:2568
FMT_CONSTEXPR auto code_point_length(const Char *begin) -> int
Definition: core.h:2313
#define FMT_ENUM_UNDERLYING_TYPE(type)
Definition: core.h:2078
std::integral_constant< bool, B > bool_constant
Definition: core.h:301
FMT_NODISCARD FMT_INLINE auto formatted_size(format_string< T... > fmt, T &&... args) -> size_t
Returns the number of chars in the output of format(fmt, args...).
Definition: core.h:3279
#define FMT_FORMAT_AS(Type, Base)
Definition: core.h:3123
#define FMT_USE_LONG_DOUBLE
Definition: core.h:192
#define FMT_FORWARD(...)
Definition: core.h:204
#define FMT_CONSTEVAL
Definition: core.h:272
#define FMT_TYPE_CONSTANT(Type, constant)
Definition: core.h:602
constexpr bool is_ascii_letter(Char c)
Definition: core.h:2293
basic_string_view< char > string_view
Definition: core.h:520
FMT_CONSTEXPR auto parse_replacement_field(const Char *begin, const Char *end, Handler &&handler) -> const Char *
Definition: core.h:2641
FMT_CONSTEXPR auto code_point_length_impl(char c) -> int
Definition: core.h:2307
#define FMT_UNICODE
Definition: core.h:260
align::type align_t
Definition: core.h:2084
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
\rst Returns a named argument to be used in a formatting function.
Definition: core.h:1940
conditional_t< long_short, unsigned, unsigned long long > ulong_type
Definition: core.h:1325
FMT_CONSTEXPR auto check_char_specs(const basic_format_specs< Char > &specs, ErrorHandler &&eh={}) -> bool
Definition: core.h:2765
typename std::remove_const< T >::type remove_const_t
Definition: core.h:305
#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:1177
typename std::remove_reference< T >::type remove_reference_t
Definition: core.h:303
uint128_opt
Definition: core.h:400
typename detail::char_t_impl< S >::type char_t
String's character type.
Definition: core.h:644
#define FMT_END_DETAIL_NAMESPACE
Definition: core.h:227
buffer_context< char > format_context
Definition: core.h:1851
@ has_named_args_bit
Definition: core.h:1537
#define FMT_MODULE_EXPORT_BEGIN
Definition: core.h:224
FMT_API void vprint(string_view fmt, format_args args)
Definition: format-inl.h:1524
#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:3254
FMT_CONSTEXPR auto parse_precision(const Char *begin, const Char *end, Handler &&handler) -> const Char *
Definition: core.h:2484
FMT_CONSTEXPR FMT_INLINE auto make_value(T &&val) -> value< Context >
Definition: core.h:1734
FMT_API void vprint_mojibake(std::FILE *, string_view, format_args)
Definition: core.h:3027
FMT_CONSTEXPR void check_string_type_spec(presentation_type type, ErrorHandler &&eh={})
Definition: core.h:2851
#define FMT_GCC_VERSION
Definition: core.h:32
constexpr auto count() -> size_t
Definition: core.h:1204
std::false_type has_fallback_formatter
Definition: core.h:1133
FMT_CONSTEXPR auto parse_presentation_type(Char type) -> presentation_type
Definition: core.h:2522
constexpr auto to_ascii(Char c) -> Char
Definition: core.h:2299
FMT_INLINE void print(format_string< T... > fmt, T &&... args)
\rst Formats args according to specifications in fmt and writes the output to stdout.
Definition: core.h:3300
constexpr auto count_named_args() -> size_t
Definition: core.h:1209
int128_opt
Definition: core.h:399
constexpr auto make_format_args(Args &&... args) -> format_arg_store< Context, remove_cvref_t< Args >... >
\rst Constructs a ~fmtformat_arg_store object that contains references to arguments and can be implic...
Definition: core.h:1923
#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:2681
@ long_short
Definition: core.h:1323
std::is_constructible< typename Context::template formatter_type< T > > has_formatter
Definition: core.h:800
FMT_CONSTEXPR void check_pointer_type_spec(presentation_type type, ErrorHandler &&eh)
Definition: core.h:2859
FMT_CONSTEXPR auto parse_width(const Char *begin, const Char *end, Handler &&handler) -> const Char *
Definition: core.h:2450
type
Definition: core.h:575
constexpr bool is_integral_type(type t)
Definition: core.h:622
arg_id_kind
Definition: core.h:2165
float_format
Definition: core.h:2779
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:2757
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:1862
#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:1324
FMT_CONSTEXPR auto do_parse_arg_id(const Char *begin, const Char *end, IDHandler &&handler) -> const Char *
Definition: core.h:2411
#define FMT_BEGIN_DETAIL_NAMESPACE
Definition: core.h:226
#define FMT_API
Definition: core.h:246
FMT_INLINE void check_format_string(const S &)
Definition: core.h:3001
@ packed_arg_bits
Definition: core.h:1533
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:4071
FMT_BEGIN_DETAIL_NAMESPACE FMT_CONSTEXPR void ignore_unused(const T &...)
Definition: core.h:343
constexpr auto encode_types() -> unsigned long long
Definition: core.h:1723
constexpr FMT_INLINE auto is_constant_evaluated(bool default_value=false) noexcept -> bool
Definition: core.h:345
#define FMT_BUFFER_CONTEXT(Char)
Definition: core.h:1854
constexpr auto is_utf8() -> bool
Definition: core.h:415
conditional_t< std::is_same< T, char >::value, appender, std::back_insert_iterator< buffer< T > > > buffer_appender
Definition: core.h:1106
@ max_packed_args
Definition: core.h:1535
FMT_CONSTEXPR auto check_cstring_type_spec(presentation_type type, ErrorHandler &&eh={}) -> bool
Definition: core.h:2841
auto get_buffer(OutputIt out) -> iterator_buffer< OutputIt, T >
Definition: core.h:1110
constexpr auto count_statically_named_args() -> size_t
Definition: core.h:1214
#define FMT_ENABLE_IF(...)
Definition: core.h:335
FMT_INLINE auto format_to_n(OutputIt out, size_t n, format_string< T... > fmt, T &&... args) -> format_to_n_result< OutputIt >
\rst Formats args according to specifications in fmt, writes up to n characters of the result to the ...
Definition: core.h:3272
void void_t
Definition: core.h:1682
#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:1115
FMT_CONSTEXPR auto to_unsigned(Int value) -> typename std::make_unsigned< Int >::type
Definition: core.h:407
auto convert_for_visit(T) -> monostate
Definition: core.h:402
FMT_CONSTEXPR FMT_INLINE auto parse_arg_id(const Char *begin, const Char *end, IDHandler &&handler) -> const Char *
Definition: core.h:2441
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:2343
FMT_INLINE auto to_string_view(const Char *s) -> basic_string_view< Char >
Definition: core.h:536
#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:309
FMT_INLINE auto format_to(OutputIt out, format_string< T... > fmt, T &&... args) -> OutputIt
\rst Formats args according to specifications in fmt, writes the result to the output iterator out an...
Definition: core.h:3240
typename std::conditional< B, T, F >::type conditional_t
Definition: core.h:300
#define FMT_CONSTEXPR20
Definition: core.h:114
auto get_container(std::back_insert_iterator< Container > it) -> Container &
Definition: core.h:829
sign::type sign_t
Definition: core.h:2088
@ is_unpacked_bit
Definition: core.h:1536
typename std::remove_cv< remove_reference_t< T > >::type remove_cvref_t
Definition: core.h:307
auto runtime(string_view s) -> basic_runtime< char >
\rst Creates a runtime format string.
Definition: core.h:3194
constexpr int invalid_arg_index
Definition: core.h:2916
#define FMT_USE_DOUBLE
Definition: core.h:189
typename std::underlying_type< T >::type underlying_t
Definition: core.h:311
presentation_type
Definition: core.h:2117
#define FMT_END_NAMESPACE
Definition: core.h:217
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:812
constexpr bool is_arithmetic_type(type t)
Definition: core.h:626
#define FMT_MODULE_EXPORT_END
Definition: core.h:225
constexpr auto has_const_formatter() -> bool
Definition: core.h:823
FMT_CONSTEXPR auto parse_float_type_spec(const basic_format_specs< Char > &specs, ErrorHandler &&eh={}) -> float_specs
Definition: core.h:2797
FMT_API auto vformat(string_view fmt, format_args args) -> std::string
Definition: format-inl.h:1466
auto find< false, char >(const char *first, const char *last, char value, const char *&out) -> bool
Definition: core.h:2333
FMT_CONSTEXPR auto get_arg_index_by_name(basic_string_view< Char > name) -> int
Definition: core.h:2932
FMT_CONSTEXPR auto parse_align(const Char *begin, const Char *end, Handler &&handler) -> const Char *
Definition: core.h:2367
static const symbolic::SymbolExpr< internal::symbolic_last_tag > last
Can be used as a parameter to Eigen::seq and Eigen::seqN functions to symbolically reference the last...
Definition: IndexedViewHelper.h:38
typename units::detail::prefix< std::micro, U >::type micro
Represents the type of class U with the metric 'micro' prefix appended.
Definition: base.h:1492
constexpr common_t< T1, T2 > max(const T1 x, const T2 y) noexcept
Compile-time pairwise maximum function.
Definition: max.hpp:35
EIGEN_CONSTEXPR Index size(const T &x)
Definition: Meta.h:479
EIGEN_CONSTEXPR Index first(const T &x) EIGEN_NOEXCEPT
Definition: IndexedViewHelper.h:81
static EIGEN_DEPRECATED const end_t end
Definition: IndexedViewHelper.h:181
Definition: format-inl.h:32
result
Definition: format.h:2564
constexpr auto format_as(Enum e) noexcept -> underlying_t< Enum >
Definition: format.h:3851
Definition: BFloat16.h:88
static constexpr const unit_t< compound_unit< energy::joules, inverse< temperature::kelvin >, inverse< substance::moles > > > R(8.3144598)
Gas constant.
static constexpr const velocity::meters_per_second_t c(299792458.0)
Speed of light in vacuum.
FMT_CONSTEXPR FMT_INLINE auto named_args() -> std::nullptr_t
Definition: core.h:1171
FMT_CONSTEXPR FMT_INLINE auto args() const -> const T *
Definition: core.h:1170
FMT_CONSTEXPR FMT_INLINE arg_data(const U &... init)
Definition: core.h:1169
T args_[1+(NUM_ARGS !=0 ? NUM_ARGS :+1)]
Definition: core.h:1153
arg_data(const arg_data &other)=delete
auto args() const -> const T *
Definition: core.h:1159
auto named_args() -> named_arg_info< Char > *
Definition: core.h:1160
named_arg_info< Char > named_args_[NUM_NAMED_ARGS]
Definition: core.h:1154
arg_data(const U &... init)
Definition: core.h:1157
FMT_CONSTEXPR FMT_INLINE auto map(float val) -> float
Definition: core.h:1392
FMT_CONSTEXPR FMT_INLINE auto map(long double val) -> long double
Definition: core.h:1394
FMT_CONSTEXPR FMT_INLINE auto map(const T(&values)[N]) -> const T(&)[N]
Definition: core.h:1461
FMT_CONSTEXPR FMT_INLINE auto map(unsigned val) -> unsigned
Definition: core.h:1357
typename Context::char_type char_type
Definition: core.h:1346
FMT_CONSTEXPR FMT_INLINE auto do_map(T &&val) -> T &
Definition: core.h:1497
auto map(...) -> unformattable
Definition: core.h:1524
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:1470
FMT_CONSTEXPR FMT_INLINE auto map(double val) -> double
Definition: core.h:1393
FMT_CONSTEXPR FMT_INLINE auto map(unsigned long val) -> ulong_type
Definition: core.h:1359
FMT_CONSTEXPR FMT_INLINE auto map(const char_type *val) -> const char_type *
Definition: core.h:1401
FMT_CONSTEXPR FMT_INLINE auto map(int128_opt val) -> int128_opt
Definition: core.h:1367
FMT_CONSTEXPR FMT_INLINE auto map(int val) -> int
Definition: core.h:1356
FMT_CONSTEXPR FMT_INLINE auto map(const T &val) -> decltype(std::declval< arg_mapper >().map(format_as(T())))
Definition: core.h:1478
FMT_CONSTEXPR FMT_INLINE auto map(long long val) -> long long
Definition: core.h:1362
FMT_CONSTEXPR FMT_INLINE auto map(char_type *val) -> const char_type *
Definition: core.h:1398
FMT_CONSTEXPR FMT_INLINE auto map(signed char val) -> int
Definition: core.h:1348
FMT_CONSTEXPR auto map(const T &) -> unformattable_pointer
Definition: core.h:1455
FMT_CONSTEXPR FMT_INLINE auto map(std::nullptr_t val) -> const void *
Definition: core.h:1441
FMT_CONSTEXPR FMT_INLINE auto map(T) -> unformattable_char
Definition: core.h:1388
FMT_CONSTEXPR FMT_INLINE auto map(bool val) -> bool
Definition: core.h:1373
FMT_CONSTEXPR FMT_INLINE auto map(unsigned short val) -> unsigned
Definition: core.h:1353
FMT_CONSTEXPR FMT_INLINE auto map(uint128_opt val) -> uint128_opt
Definition: core.h:1370
FMT_CONSTEXPR FMT_INLINE auto map(const T &val) -> basic_string_view< char_type >
Definition: core.h:1407
FMT_CONSTEXPR FMT_INLINE auto map(void *val) -> const void *
Definition: core.h:1437
FMT_CONSTEXPR FMT_INLINE auto map(unsigned long long val) -> unsigned long long
Definition: core.h:1363
FMT_CONSTEXPR FMT_INLINE auto map(T &&val) -> decltype(this->do_map(std::forward< T >(val)))
Definition: core.h:1513
FMT_CONSTEXPR FMT_INLINE auto map(long val) -> long_type
Definition: core.h:1358
FMT_CONSTEXPR FMT_INLINE auto map(T val) -> char_type
Definition: core.h:1377
FMT_CONSTEXPR FMT_INLINE auto map(short val) -> int
Definition: core.h:1352
FMT_CONSTEXPR FMT_INLINE auto map(const T &) -> unformattable_char
Definition: core.h:1414
FMT_CONSTEXPR FMT_INLINE auto map(const void *val) -> const void *
Definition: core.h:1438
FMT_CONSTEXPR FMT_INLINE auto do_map(T &&) -> unformattable_const
Definition: core.h:1501
FMT_CONSTEXPR FMT_INLINE auto map(unsigned char val) -> unsigned
Definition: core.h:1349
FMT_CONSTEXPR FMT_INLINE auto map(const T &named_arg) -> decltype(std::declval< arg_mapper >().map(named_arg.value))
Definition: core.h:1519
FMT_CONSTEXPR arg_ref(basic_string_view< Char > name)
Definition: core.h:2173
FMT_CONSTEXPR arg_ref()
Definition: core.h:2169
FMT_CONSTEXPR auto operator=(int idx) -> arg_ref &
Definition: core.h:2176
arg_id_kind kind
Definition: core.h:2182
FMT_CONSTEXPR arg_ref(int index)
Definition: core.h:2171
basic_string_view< Char > str
Definition: core.h:3144
buffer_traits(size_t)
Definition: core.h:949
auto limit(size_t size) -> size_t
Definition: core.h:951
auto count() const -> size_t
Definition: core.h:950
decltype(to_string_view(std::declval< S >())) result
Definition: core.h:571
typename result::value_type type
Definition: core.h:572
void(* format)(void *arg, parse_context &parse_ctx, Context &ctx)
Definition: core.h:1236
void * value
Definition: core.h:1235
typename Context::parse_context_type parse_context
Definition: core.h:1234
Definition: format.h:1552
FMT_NORETURN void on_error(const char *message)
Definition: core.h:637
constexpr error_handler()=default
constexpr error_handler(const error_handler &)=default
FMT_CONSTEXPR void operator=(basic_string_view< Char > s)
Definition: core.h:2100
FMT_CONSTEXPR auto operator[](size_t index) const -> const Char &
Definition: core.h:2111
constexpr auto size() const -> size_t
Definition: core.h:2107
constexpr auto data() const -> const Char *
Definition: core.h:2108
FMT_CONSTEXPR auto operator[](size_t index) -> Char &
Definition: core.h:2110
float_format format
Definition: core.h:2788
int precision
Definition: core.h:2787
bool upper
Definition: core.h:2790
bool showpoint
Definition: core.h:2793
sign_t sign
Definition: core.h:2789
bool binary32
Definition: core.h:2792
bool locale
Definition: core.h:2791
Specifies if T is a character type.
Definition: core.h:523
constexpr monostate()
Definition: core.h:326
const Char * name
Definition: core.h:1145
int id
Definition: core.h:1146
const named_arg_info< Char > * data
Definition: core.h:1229
size_t size
Definition: core.h:1230
const T & value
Definition: core.h:1140
const Char * name
Definition: core.h:1139
named_arg(const Char *n, const T &v)
Definition: core.h:1141
const Char * data
Definition: core.h:1224
size_t size
Definition: core.h:1225
remove_cvref_t< decltype(T::value)> type
Definition: core.h:2737
T type
Definition: core.h:2734
T type
Definition: core.h:308
int index
Definition: core.h:2187
basic_string_view< Char > name
Definition: core.h:2188
FMT_CONSTEXPR value(basic_string_view< Char > n)
Definition: core.h:2185
FMT_CONSTEXPR value(int id=0)
Definition: core.h:2184
#define S(label, offset, message)
Definition: Errors.h:119