|
Loading...
Searching...
No Matches
Go to the documentation of this file.
21#define FMT_VERSION 70103
24# define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__)
26# define FMT_CLANG_VERSION 0
29#if defined(__GNUC__) && !defined(__clang__)
30# define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
32# define FMT_GCC_VERSION 0
35#if defined(__INTEL_COMPILER)
36# define FMT_ICC_VERSION __INTEL_COMPILER
38# define FMT_ICC_VERSION 0
41#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
42# define FMT_HAS_GXX_CXX11 FMT_GCC_VERSION
44# define FMT_HAS_GXX_CXX11 0
48# define FMT_NVCC __NVCC__
54# define FMT_MSC_VER _MSC_VER
55# define FMT_SUPPRESS_MSC_WARNING(n) __pragma(warning(suppress : n))
58# define FMT_SUPPRESS_MSC_WARNING(n)
62# define FMT_HAS_FEATURE(x) __has_feature(x)
64# define FMT_HAS_FEATURE(x) 0
67#if defined(__has_include) && !defined(__INTELLISENSE__) && \
68 (!FMT_ICC_VERSION || FMT_ICC_VERSION >= 1600)
69# define FMT_HAS_INCLUDE(x) __has_include(x)
71# define FMT_HAS_INCLUDE(x) 0
74#ifdef __has_cpp_attribute
75# define FMT_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)
77# define FMT_HAS_CPP_ATTRIBUTE(x) 0
80#define FMT_HAS_CPP14_ATTRIBUTE(attribute) \
81 (__cplusplus >= 201402L && FMT_HAS_CPP_ATTRIBUTE(attribute))
83#define FMT_HAS_CPP17_ATTRIBUTE(attribute) \
84 (__cplusplus >= 201703L && FMT_HAS_CPP_ATTRIBUTE(attribute))
88#ifndef FMT_USE_CONSTEXPR
89# define FMT_USE_CONSTEXPR \
90 (FMT_HAS_FEATURE(cxx_relaxed_constexpr) || FMT_MSC_VER >= 1910 || \
91 (FMT_GCC_VERSION >= 600 && __cplusplus >= 201402L)) && \
92 !FMT_NVCC && !FMT_ICC_VERSION
95# define FMT_CONSTEXPR constexpr
96# define FMT_CONSTEXPR_DECL constexpr
98# define FMT_CONSTEXPR inline
99# define FMT_CONSTEXPR_DECL
103# if FMT_HAS_FEATURE(cxx_override_control) || \
104 (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1900
105# define FMT_OVERRIDE override
112#ifndef FMT_EXCEPTIONS
113# if (defined(__GNUC__) && !defined(__EXCEPTIONS)) || \
114 FMT_MSC_VER && !_HAS_EXCEPTIONS
115# define FMT_EXCEPTIONS 0
117# define FMT_EXCEPTIONS 1
122#ifndef FMT_USE_NOEXCEPT
123# define FMT_USE_NOEXCEPT 0
126#if FMT_USE_NOEXCEPT || FMT_HAS_FEATURE(cxx_noexcept) || \
127 (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1900
128# define FMT_DETECTED_NOEXCEPT noexcept
129# define FMT_HAS_CXX11_NOEXCEPT 1
131# define FMT_DETECTED_NOEXCEPT throw()
132# define FMT_HAS_CXX11_NOEXCEPT 0
136# if FMT_EXCEPTIONS || FMT_HAS_CXX11_NOEXCEPT
137# define FMT_NOEXCEPT FMT_DETECTED_NOEXCEPT
145#if FMT_EXCEPTIONS && FMT_HAS_CPP_ATTRIBUTE(noreturn) && !FMT_MSC_VER && \
147# define FMT_NORETURN [[noreturn]]
152#ifndef FMT_DEPRECATED
153# if FMT_HAS_CPP14_ATTRIBUTE(deprecated) || FMT_MSC_VER >= 1900
154# define FMT_DEPRECATED [[deprecated]]
156# if (defined(__GNUC__) && !defined(__LCC__)) || defined(__clang__)
157# define FMT_DEPRECATED __attribute__((deprecated))
159# define FMT_DEPRECATED __declspec(deprecated)
161# define FMT_DEPRECATED
167#if FMT_ICC_VERSION || defined(__PGI) || FMT_NVCC
168# define FMT_DEPRECATED_ALIAS
170# define FMT_DEPRECATED_ALIAS FMT_DEPRECATED
174# if FMT_GCC_VERSION || FMT_CLANG_VERSION
175# define FMT_INLINE inline __attribute__((always_inline))
177# define FMT_INLINE inline
181#ifndef FMT_USE_INLINE_NAMESPACES
182# if FMT_HAS_FEATURE(cxx_inline_namespaces) || FMT_GCC_VERSION >= 404 || \
183 (FMT_MSC_VER >= 1900 && !_MANAGED)
184# define FMT_USE_INLINE_NAMESPACES 1
186# define FMT_USE_INLINE_NAMESPACES 0
190#ifndef FMT_BEGIN_NAMESPACE
191# if FMT_USE_INLINE_NAMESPACES
192# define FMT_INLINE_NAMESPACE inline namespace
193# define FMT_END_NAMESPACE \
197# define FMT_INLINE_NAMESPACE namespace
198# define FMT_END_NAMESPACE \
200 using namespace v7; \
203# define FMT_BEGIN_NAMESPACE \
205 FMT_INLINE_NAMESPACE v7 {
208#if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
209# define FMT_CLASS_API FMT_SUPPRESS_MSC_WARNING(4275)
211# define FMT_API __declspec(dllexport)
212# define FMT_EXTERN_TEMPLATE_API FMT_API
214# elif defined(FMT_SHARED)
215# define FMT_API __declspec(dllimport)
216# define FMT_EXTERN_TEMPLATE_API FMT_API
219# define FMT_CLASS_API
224#ifndef FMT_EXTERN_TEMPLATE_API
225# define FMT_EXTERN_TEMPLATE_API
227#ifndef FMT_INSTANTIATION_DEF_API
228# define FMT_INSTANTIATION_DEF_API FMT_API
231#ifndef FMT_HEADER_ONLY
232# define FMT_EXTERN extern
238#if (FMT_HAS_INCLUDE(<string_view>) && \
239 (__cplusplus > 201402L || defined(_LIBCPP_VERSION))) || \
240 (defined(_MSVC_LANG) && _MSVC_LANG > 201402L && _MSC_VER >= 1910)
241# include <string_view>
242# define FMT_USE_STRING_VIEW
243#elif FMT_HAS_INCLUDE("experimental/string_view") && __cplusplus >= 201402L
244# include <experimental/string_view>
245# define FMT_USE_EXPERIMENTAL_STRING_VIEW
249# define FMT_UNICODE !FMT_MSC_VER
251#if FMT_UNICODE && FMT_MSC_VER
252# pragma execution_character_set("utf-8")
258template < bool B, class T = void>
260template < bool B, class T, class F>
277#define FMT_ENABLE_IF(...) enable_if_t<(__VA_ARGS__), int> = 0
285 const char* message);
290# define FMT_ASSERT(condition, message) ((void)0)
292# define FMT_ASSERT(condition, message) \
295 : ::fmt::detail::assert_fail(__FILE__, __LINE__, (message)))
299#if defined(FMT_USE_STRING_VIEW)
300template < typename Char> using std_string_view = std::basic_string_view<Char>;
301#elif defined(FMT_USE_EXPERIMENTAL_STRING_VIEW)
302template < typename Char>
303using std_string_view = std::experimental::basic_string_view<Char>;
310#elif defined(__SIZEOF_INT128__) && !FMT_NVCC && \
311 !(FMT_CLANG_VERSION && FMT_MSC_VER)
312# define FMT_USE_INT128 1
316# define FMT_USE_INT128 0
324template < typename Int>
327 return static_cast<typename std::make_unsigned<Int>::type >( value);
334 ( sizeof(micro) == 3 && micro[0] == 0xC2 && micro[1] == 0xB5);
344#ifdef FMT_USE_INTERNAL
345namespace internal = detail;
377#if __cplusplus >= 201703L
381 : data_(s), size_(std::char_traits<Char>::length(s)) {}
384 template < typename Traits, typename Alloc>
386 const std::basic_string<Char, Traits, Alloc>& s) FMT_NOEXCEPT
414 int result = std::char_traits<Char>::compare( data_, other. data_, str_size);
444template < typename T> struct is_char : std::false_type {};
445template <> struct is_char<char> : std::true_type {};
446template <> struct is_char<wchar_t> : std::true_type {};
448template <> struct is_char<char16_t> : std::true_type {};
449template <> struct is_char<char32_t> : std::true_type {};
467template < typename Char, FMT_ENABLE_IF(is_ char<Char>::value)>
472template < typename Char, typename Traits, typename Alloc>
474 const std::basic_string<Char, Traits, Alloc>& s) {
478template < typename Char>
483template < typename Char,
496template < typename S, FMT_ENABLE_IF(is_compile_ string<S>::value)>
503using fmt::v7::to_string_view;
509struct is_string : std::is_class<decltype(to_string_view(std::declval<S>()))> {
515 using type = typename result::value_type;
521#ifdef FMT_ENFORCE_COMPILE_STRING
523 "FMT_ENFORCE_COMPILE_STRING requires all format strings to use "
558template < typename Char, typename ErrorHandler = detail::error_handler>
597 on_error( "cannot switch from manual to automatic argument indexing");
607 on_error( "cannot switch from automatic to manual argument indexing");
615 ErrorHandler::on_error(message);
629template < typename T, typename Char = char, typename Enable = void>
637template < typename T, typename Context>
639 std::is_constructible<typename Context::template formatter_type<T>>;
643template < typename Char>
649template < typename Container>
651 using bi_iterator = std::back_insert_iterator<Container>;
652 struct accessor : bi_iterator {
653 accessor(bi_iterator iter) : bi_iterator(iter) {}
654 using bi_iterator::container;
656 return *accessor(it).container;
752 size_t limit( size_t size) { return size; }
766 return size < n ? size : n;
771template < typename OutputIt, typename T, typename Traits = buffer_traits>
795 size_t count() const { return Traits::count() + this-> size(); }
805 T* out() { return &*this->end(); }
809template < typename Container>
812 typename Container::value_type>>
813 final : public buffer<typename Container::value_type> {
828 std::back_insert_iterator<Container> out() {
829 return std::back_inserter(container_);
843 count_ += this-> size();
857 using base = std::back_insert_iterator<buffer<T>>;
876template < typename T, typename OutputIt>
887template < typename Buffer>
895template < typename T, typename Char = char, typename Enable = void>
901template < typename T, typename Context>
903 std::is_constructible<fallback_formatter<T, typename Context::char_type>>;
918template < typename T, typename Char, size_t NUM_ARGS, size_t NUM_NAMED_ARGS>
922 T args_[1 + (NUM_ARGS != 0 ? NUM_ARGS : +1)];
925 template < typename... U>
932template < typename T, typename Char, size_t NUM_ARGS>
935 T args_[NUM_ARGS != 0 ? NUM_ARGS : +1];
937 template < typename... U>
943template < typename Char>
946template < typename Char, typename T, typename... Tail>
948 int named_arg_count, const T&, const Tail&... args) {
952template < typename Char, typename T, typename... Tail>
955 const Tail&... args) {
956 named_args[named_arg_count++] = { arg. name, arg_count};
960template < typename... Args>
965template < typename T, typename Char>
968template < bool B = false> constexpr size_t count() { return B ? 1 : 0; }
969template < bool B1, bool B2, bool... Tail> constexpr size_t count() {
974 return count<is_named_arg<Args>::value...>();
1001template < typename T, typename Char>
1004#define FMT_TYPE_CONSTANT(Type, constant) \
1005 template <typename Char> \
1006 struct type_constant<Type, Char> \
1007 : std::integral_constant<type, type::constant> {}
1049template < typename Context> class value {
1084 string.data = val. data();
1085 string.size = val. size();
1098 typename Context::template formatter_type<T>,
1104 template < typename T, typename Formatter>
1106 typename Context::parse_context_type& parse_ctx,
1109 parse_ctx.advance_to(f.parse(parse_ctx));
1110 ctx.advance_to(f.format(* static_cast<const T* >( arg), ctx));
1114template < typename Context, typename T>
1143 template < typename T, FMT_ENABLE_IF(is_ char<T>::value)>
1146 std::is_same<T, char>::value || std::is_same<T, char_type>::value,
1147 "mixing character types is disallowed");
1157 template < typename T, FMT_ENABLE_IF(is_ string<T>::value)>
1159 static_assert(std::is_same<char_type, char_t<T>>::value,
1160 "mixing character types is disallowed");
1163 template < typename T,
1182 static_assert(std::is_same<char_type, char>::value, "invalid string type");
1183 return reinterpret_cast<const char* >(val);
1186 static_assert(std::is_same<char_type, char>::value, "invalid string type");
1187 return reinterpret_cast<const char* >(val);
1190 const auto* const_val = val;
1191 return map(const_val);
1194 const auto* const_val = val;
1195 return map(const_val);
1206 static_assert(! sizeof(T), "formatting of non-void pointers is disallowed");
1210 template < typename T,
1215 -> decltype(std::declval<arg_mapper>().map(
1216 static_cast<typename std::underlying_type<T>::type >(val))) {
1217 return map( static_cast<typename std::underlying_type<T>::type >(val));
1219 template < typename T,
1227 template < typename T>
1229 -> decltype(std::declval<arg_mapper>().map(val.value)) {
1230 return map(val.value);
1237template < typename T, typename Context>
1240 typename Context::char_type>;
1256 template < typename ContextType, typename T>
1260 template < typename Visitor, typename Ctx>
1263 -> decltype(vis(0));
1270 template < typename T, typename Char, size_t NUM_ARGS, size_t NUM_NAMED_ARGS>
1281 void format( typename Context::parse_context_type& parse_ctx,
1282 Context& ctx) const {
1309template < typename Visitor, typename Context>
1312 using char_type = typename Context::char_type;
1313 switch ( arg.type_) {
1317 return vis( arg.value_.int_value);
1319 return vis( arg.value_.uint_value);
1321 return vis( arg.value_.long_long_value);
1323 return vis( arg.value_.ulong_long_value);
1326 return vis( arg.value_.int128_value);
1328 return vis( arg.value_.uint128_value);
1335 return vis( arg.value_.bool_value);
1337 return vis( arg.value_.char_value);
1339 return vis( arg.value_.float_value);
1341 return vis( arg.value_.double_value);
1343 return vis( arg.value_.long_double_value);
1345 return vis( arg.value_.string.data);
1348 arg.value_.string.size));
1350 return vis( arg.value_.pointer);
1363template < typename... Ts>
1366template < typename It, typename T, typename Enable = void>
1369template < typename It, typename T>
1372 void_t<typename std::iterator_traits<It>::iterator_category,
1373 decltype(*std::declval<It>() = std::declval<T>())>>
1374 : std::true_type {};
1376template < typename OutputIt>
1378template < typename Container>
1380 : std::true_type {};
1382template < typename OutputIt>
1384template < typename Container>
1387template < typename Char>
1389 : std::true_type {};
1398 template < typename Locale> explicit locale_ref( const Locale& loc);
1402 template < typename Locale> Locale get() const;
1405template < typename> constexpr unsigned long long encode_types() { return 0; }
1407template < typename Context, typename Arg, typename... Args>
1413template < typename Context, typename T>
1424 "Cannot format an argument. To make type T formattable provide a "
1425 "formatter<T> specialization: https://fmt.dev/latest/api.html#udt");
1428template < typename T, typename U> inline const U& check( const U& val) {
1435template < bool IS_PACKED, typename Context, type, typename T,
1441template < bool IS_PACKED, typename Context, type, typename T,
1448template < typename T>
1451template < typename T> const T& unwrap( const T& v) { return v; }
1452template < typename T> const T& unwrap( const std::reference_wrapper<T>& v) {
1453 return static_cast<const T& >(v);
1460 template < typename = void> struct node {
1468 template < typename Arg>
1471 template < typename Char>
1479 template < typename T, typename Arg> const T& push( const Arg& arg) {
1482 new_node->next = std::move( head_);
1483 head_ = std::move(new_node);
1536template < typename Char>
1543#define FMT_BUFFER_CONTEXT(Char) \
1544 basic_format_context<detail::buffer_appender<Char>, Char>
1553template < typename Context, typename... Args>
1574 static constexpr unsigned long long desc =
1576 : detail::is_unpacked_bit | num_args) |
1577 (num_named_args != 0
1578 ? static_cast<unsigned long long>( detail::has_named_args_bit)
1589 detail::mapped_type_constant<Args, Context>::value>(args)...} {
1604 const Args&... args) {
1616template < typename... Args, typename S, typename Char = char_t<S>>
1622 std::is_base_of<detail::view, remove_reference_t<Args>>::value &&
1623 std::is_reference<Args>::value)...>() == 0,
1624 "passing views as lvalues is disallowed");
1639template < typename Char, typename T>
1655template < typename Context>
1671 std::is_same<T, basic_string_view<char_type>>::value ||
1672 std::is_same<T, detail::std_string_view<char_type>>::value ||
1679 template < typename T>
1681 std::basic_string<char_type>, T>;
1684 std::vector<basic_format_arg<Context>> data_;
1695 (named_info_.empty()
1701 return named_info_.empty() ? data_.data() : data_.data() + 1;
1708 template < typename T>
1710 if (named_info_.empty()) {
1712 data_.insert(data_.begin(), {zero_ptr, 0});
1715 auto pop_one = [](std::vector<basic_format_arg<Context>>* data) {
1718 std::unique_ptr<std::vector<basic_format_arg<Context>>, decltype(pop_one)>
1719 guard{&data_, pop_one};
1720 named_info_.push_back({ arg.name, static_cast<int>(data_.size() - 2u)});
1721 data_[0].value_.named_args = {named_info_.data(), named_info_.size()};
1776 "objects of built-in types and string views are always copied");
1777 emplace_arg( arg.get());
1785 template < typename T>
1788 dynamic_args_. push<std::basic_string<char_type>>( arg.name).c_str();
1793 emplace_arg(fmt::arg(arg_name, arg.value));
1800 named_info_.clear();
1810 void reserve( size_t new_cap, size_t new_cap_named) {
1812 "Set of arguments includes set of named arguments");
1813 data_.reserve(new_cap);
1814 named_info_.reserve(new_cap_named);
1874 template < typename... Args>
1917 const auto& named_args =
1919 for ( size_t i = 0; i < named_args.size; ++i) {
1920 if (named_args.data[i].name == name) return named_args.data[i].id;
1927 return static_cast<int>( is_packed() ? max_packed
1932#ifdef FMT_ARM_ABI_COMPATIBILITY
1942 template < typename... Args>
1952template < typename Char, FMT_ENABLE_IF(!std::is_same<Char, char>::value)>
1953std::basic_string<Char> vformat(
1959template < typename Char>
1965template < typename Char, typename Args,
1978template < typename OutputIt, typename S, typename Char = char_t<S>,
1979 bool enable = detail::is_output_iterator<OutputIt, Char>::value>
1982 -> typename std::enable_if<enable, OutputIt>::type {
2000template < typename OutputIt, typename S, typename... Args,
2002inline auto format_to(OutputIt out, const S& format_str, Args&&... args) ->
2003 typename std::enable_if<enable, OutputIt>::type {
2004 const auto& vargs = fmt::make_args_checked<Args...>(format_str, args...);
2015template < typename OutputIt, typename Char, typename... Args,
2033template < typename OutputIt, typename S, typename... Args,
2036 const Args&... args) ->
2037 typename std::enable_if<enable, format_to_n_result<OutputIt>>::type {
2038 const auto& vargs = fmt::make_args_checked<Args...>(format_str, args...);
2046template < typename... Args>
2048 const auto& vargs = fmt::make_args_checked<Args...>(format_str, args...);
2054template < typename S, typename Char = char_t<S>>
2056 const S& format_str,
2073template < typename S, typename... Args, typename Char = char_t<S>>
2075 const auto& vargs = fmt::make_args_checked<Args...>(format_str, args...);
2093template < typename S, typename... Args, typename Char = char_t<S>>
2094inline void print(std::FILE* f, const S& format_str, Args&&... args) {
2095 const auto& vargs = fmt::make_args_checked<Args...>(format_str, args...);
2112template < typename S, typename... Args, typename Char = char_t<S>>
2113inline void print( const S& format_str, Args&&... args) {
2114 const auto& vargs = fmt::make_args_checked<Args...>(format_str, args...);
format_arg arg(int id) const
void advance_to(iterator it)
format_arg arg(basic_string_view< char_type > name)
detail::locale_ref locale()
int arg_id(basic_string_view< char_type > name)
void on_error(const char *message)
detail::error_handler error_handler()
void operator=(const basic_format_context &)=delete
basic_format_args< basic_format_context > args_
const basic_format_args< basic_format_context > & args() const
basic_format_context(OutputIt out, basic_format_args< basic_format_context > ctx_args, detail::locale_ref loc=detail::locale_ref())
basic_format_context(const basic_format_context &)=delete
constexpr basic_format_parse_context(basic_string_view< Char > format_str, ErrorHandler eh={}, int next_arg_id=0)
FMT_CONSTEXPR void advance_to(iterator it)
constexpr iterator end() const FMT_NOEXCEPT
FMT_CONSTEXPR void on_error(const char *message)
FMT_CONSTEXPR void check_arg_id(int)
FMT_CONSTEXPR void check_arg_id(basic_string_view< Char >)
constexpr iterator begin() const FMT_NOEXCEPT
typename basic_string_view< Char >::iterator iterator
basic_string_view< Char > format_str_
constexpr ErrorHandler error_handler() const
FMT_CONSTEXPR int next_arg_id()
friend bool operator<(basic_string_view lhs, basic_string_view rhs)
friend bool operator>=(basic_string_view lhs, basic_string_view rhs)
constexpr basic_string_view(const Char *s, size_t count) FMT_NOEXCEPT
constexpr basic_string_view() FMT_NOEXCEPT
FMT_CONSTEXPR void remove_prefix(size_t n)
int compare(basic_string_view other) const
friend bool operator!=(basic_string_view lhs, basic_string_view rhs)
friend bool operator>(basic_string_view lhs, basic_string_view rhs)
constexpr const Char & operator[](size_t pos) const
friend bool operator<=(basic_string_view lhs, basic_string_view rhs)
constexpr size_t size() const
FMT_CONSTEXPR basic_string_view(const std::basic_string< Char, Traits, Alloc > &s) FMT_NOEXCEPT
constexpr const Char * data() const
constexpr iterator end() const
friend bool operator==(basic_string_view lhs, basic_string_view rhs)
FMT_CONSTEXPR basic_string_view(S s) FMT_NOEXCEPT
constexpr iterator begin() const
basic_string_view(const Char *s)
std::back_insert_iterator< buffer< T > > base
buffer_appender(buffer< T > &buf)
buffer_appender operator++(int)
buffer_appender & operator++()
const T * end() const FMT_NOEXCEPT
const T * begin() const FMT_NOEXCEPT
void try_reserve(size_t new_capacity)
void append(const U *begin, const U *end)
void try_resize(size_t count)
buffer(const buffer &)=delete
void operator=(const buffer &)=delete
buffer(T *p=nullptr, size_t sz=0, size_t cap=0) FMT_NOEXCEPT
void push_back(const T &value)
const T & operator[](I index) const
void set(T *buf_data, size_t buf_capacity) FMT_NOEXCEPT
const T * data() const FMT_NOEXCEPT
const T & const_reference
size_t size() const FMT_NOEXCEPT
size_t capacity() const FMT_NOEXCEPT
virtual void grow(size_t capacity)=0
void grow(size_t) final FMT_OVERRIDE
std::unique_ptr< node<> > head_
const T & push(const Arg &arg)
fixed_buffer_traits(size_t limit)
size_t limit(size_t size)
void grow(size_t) final FMT_OVERRIDE
iterator_buffer(T *out, size_t=0)
std::back_insert_iterator< Container > out()
iterator_buffer(std::back_insert_iterator< Container > out, size_t=0)
void grow(size_t capacity) final FMT_OVERRIDE
iterator_buffer(Container &c)
void grow(size_t) final FMT_OVERRIDE
iterator_buffer(OutputIt out, size_t n=buffer_size)
FMT_INLINE value(const void *val)
FMT_INLINE value(int128_t val)
static void format_custom_arg(const void *arg, typename Context::parse_context_type &parse_ctx, Context &ctx)
named_arg_value< char_type > named_args
FMT_INLINE value(const named_arg_info< char_type > *args, size_t size)
FMT_INLINE value(char_type val)
custom_value< Context > custom
FMT_INLINE value(long long val)
FMT_INLINE value(bool val)
constexpr FMT_INLINE value(int val=0)
FMT_INLINE value(double val)
FMT_INLINE value(const T &val)
long long long_long_value
FMT_INLINE value(uint128_t val)
FMT_INLINE value(long double val)
FMT_INLINE value(float val)
typename Context::char_type char_type
constexpr FMT_INLINE value(unsigned val)
string_value< char_type > string
FMT_INLINE value(const char_type *val)
FMT_INLINE value(basic_string_view< char_type > val)
long double long_double_value
unsigned long long ulong_long_value
FMT_INLINE value(unsigned long long val)
typename std::enable_if< B, T >::type enable_if_t
#define FMT_ASSERT(condition, message)
FMT_API void vprint(string_view, format_args)
std::integral_constant< bool, B > bool_constant
size_t formatted_size(string_view format_str, Args &&... args)
#define FMT_TYPE_CONSTANT(Type, constant)
auto make_args_checked(const S &format_str, const remove_reference_t< Args > &... args) -> format_arg_store< buffer_context< Char >, remove_reference_t< Args >... >
typename std::remove_const< T >::type remove_const_t
typename std::remove_reference< T >::type remove_reference_t
typename detail::char_t_impl< S >::type char_t
buffer_context< char > format_context
format_to_n_result< OutputIt > vformat_to_n(OutputIt out, size_t n, basic_string_view< Char > format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args)
detail::named_arg< Char, T > arg(const Char *name, const T &arg)
typename std::remove_cv< remove_reference_t< T > >::type remove_cvref_t
auto format_to(OutputIt out, const S &format_str, Args &&... args) -> typename std::enable_if< enable, OutputIt >::type
format_arg_store< Context, Args... > make_format_args(const Args &... args)
#define FMT_SUPPRESS_MSC_WARNING(n)
FMT_INLINE std::basic_string< Char > format(const S &format_str, Args &&... args)
#define FMT_BEGIN_NAMESPACE
std::is_constructible< typename Context::template formatter_type< T > > has_formatter
FMT_INLINE std::basic_string< Char > vformat(const S &format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args)
#define FMT_BUFFER_CONTEXT(Char)
basic_string_view< Char > to_string_view(const Char *s)
#define FMT_ENABLE_IF(...)
typename type_identity< T >::type type_identity_t
void print(std::FILE *f, const S &format_str, Args &&... args)
FMT_CONSTEXPR_DECL FMT_INLINE auto visit_format_arg(Visitor &&vis, const basic_format_arg< Context > &arg) -> decltype(vis(0))
typename std::conditional< B, T, F >::type conditional_t
auto format_to_n(OutputIt out, size_t n, const S &format_str, const Args &... args) -> typename std::enable_if< enable, format_to_n_result< OutputIt > >::type
#define FMT_END_NAMESPACE
#define FMT_CONSTEXPR_DECL
auto vformat_to(OutputIt out, const S &format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args) -> typename std::enable_if< enable, OutputIt >::type
constexpr unsigned long long encode_types()
Container & get_container(std::back_insert_iterator< Container > it)
conditional_t< long_short, unsigned, unsigned long long > ulong_type
void vprint_mojibake(std::FILE *, basic_string_view< Char >, const Args &)
void init_named_args(named_arg_info< Char > *, int, int)
FMT_NORETURN FMT_API void assert_fail(const char *file, int line, const char *message)
const T & unwrap(const T &v)
FMT_CONSTEXPR basic_format_arg< Context > make_arg(const T &value)
FMT_CONSTEXPR std::make_unsigned< Int >::type to_unsigned(Int value)
std::is_constructible< fallback_formatter< T, typename Context::char_type > > has_fallback_formatter
void vformat_to(buffer< Char > &buf, const text_style &ts, basic_string_view< Char > format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args)
constexpr bool is_integral_type(type t)
constexpr size_t count_named_args()
iterator_buffer< OutputIt, T > get_buffer(OutputIt)
std::basic_string< Char > vformat(basic_string_view< Char > format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args)
conditional_t< long_short, int, long long > long_type
OutputIt get_buffer_init(OutputIt out)
FMT_INLINE void check_format_string(const S &)
constexpr T const_check(T value)
auto get_iterator(Buffer &buf) -> decltype(buf.out())
constexpr bool is_unicode()
constexpr bool is_arithmetic_type(type t)
typename detail::void_t_impl< Ts... >::type void_t
FMT_INLINE arg_data(const U &... init)
FMT_INLINE const T * args() const
FMT_INLINE std::nullptr_t named_args()
arg_data(const arg_data &other)=delete
named_arg_info< Char > named_args_[NUM_NAMED_ARGS]
arg_data(const U &... init)
T args_[1+(NUM_ARGS !=0 ? NUM_ARGS :+1)]
named_arg_info< Char > * named_args()
FMT_CONSTEXPR basic_string_view< char_type > map(const T &val)
FMT_CONSTEXPR auto map(const T &val) -> decltype(std::declval< arg_mapper >().map(static_cast< typename std::underlying_type< T >::type >(val)))
FMT_CONSTEXPR int map(int val)
FMT_CONSTEXPR unsigned map(unsigned val)
FMT_CONSTEXPR const char_type * map(char_type *val)
FMT_CONSTEXPR const char * map(const unsigned char *val)
FMT_CONSTEXPR ulong_type map(unsigned long val)
FMT_CONSTEXPR long_type map(long val)
FMT_CONSTEXPR const char * map(const signed char *val)
FMT_CONSTEXPR const void * map(const void *val)
FMT_CONSTEXPR unsigned long long map(unsigned long long val)
FMT_CONSTEXPR auto map(const named_arg< char_type, T > &val) -> decltype(std::declval< arg_mapper >().map(val.value))
FMT_CONSTEXPR int128_t map(int128_t val)
FMT_CONSTEXPR int map(signed char val)
FMT_CONSTEXPR float map(float val)
FMT_CONSTEXPR uint128_t map(uint128_t val)
FMT_CONSTEXPR char_type map(T val)
FMT_CONSTEXPR bool map(bool val)
FMT_CONSTEXPR double map(double val)
FMT_CONSTEXPR const char * map(signed char *val)
FMT_CONSTEXPR const void * map(std::nullptr_t val)
FMT_CONSTEXPR const char * map(unsigned char *val)
FMT_CONSTEXPR int map(const T *)
FMT_CONSTEXPR const T & map(const T &val)
typename Context::char_type char_type
FMT_CONSTEXPR const void * map(void *val)
FMT_CONSTEXPR const char_type * map(const char_type *val)
FMT_CONSTEXPR long double map(long double val)
FMT_CONSTEXPR unsigned map(unsigned char val)
FMT_CONSTEXPR unsigned map(unsigned short val)
FMT_CONSTEXPR int map(short val)
FMT_CONSTEXPR long long map(long long val)
size_t limit(size_t size)
typename result::value_type type
decltype(to_string_view(std::declval< S >())) result
void(* format)(const void *arg, parse_context &parse_ctx, Context &ctx)
typename Context::parse_context_type parse_context
std::unique_ptr< node<> > next
FMT_CONSTEXPR typed_node(const basic_string_view< Char > &arg)
FMT_CONSTEXPR typed_node(const Arg &arg)
constexpr error_handler()=default
FMT_NORETURN FMT_API void on_error(const char *message)
constexpr error_handler(const error_handler &)=default
const named_arg_info< Char > * data
named_arg(const Char *n, const T &v)
|