spdlog
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
format.h File Reference

Go to the source code of this file.

#include <cmath>
#include <cstdint>
#include <limits>
#include <memory>
#include <stdexcept>
#include <system_error>
#include <utility>
#include "core.h"

Classes

struct  detail::fallback_uintptr
 
struct  detail::is_locale< T, Enable >
 
struct  detail::is_locale< T, void_t< decltype(T::classic())> >
 
class  basic_memory_buffer< T, SIZE, Allocator >
 
struct  is_contiguous< basic_memory_buffer< T, SIZE, Allocator > >
 
class  format_error
 
struct  is_integral< T >
 
struct  is_integral< int128_t >
 
struct  is_integral< uint128_t >
 
struct  basic_data< T >
 
struct  data
 
struct  thousands_sep_result< Char >
 
struct  format_decimal_result< Iterator >
 
class  utf8_to_utf16
 
struct  dragonbox::float_info< float >
 
struct  dragonbox::float_info< double >
 
struct  dragonbox::decimal_fp< T >
 
struct  write_int_data< Char >
 
struct  write_int_arg< UInt >
 
struct  big_decimal_fp
 
struct  default_arg_formatter< Char >
 
struct  arg_formatter< Char >
 
struct  custom_formatter< Char >
 
class  width_checker< ErrorHandler >
 
class  precision_checker< ErrorHandler >
 
class  specs_handler< Char >
 
class  format_int
 
struct  formatter< void *, Char >
 
struct  formatter< Char[N], Char >
 
class  dynamic_formatter< Char >
 
struct  dynamic_formatter< Char >::null_handler
 
class  bytes
 
struct  formatter< bytes >
 
struct  join_view< It, Sentinel, Char >
 
struct  formatter< join_view< It, Sentinel, Char >, Char >
 

Namespaces

namespace  detail
 
namespace  detail_exported
 
namespace  dragonbox
 

Macros

#define FMT_ICC_VERSION   0
 
#define FMT_CUDA_VERSION   0
 
#define FMT_HAS_BUILTIN(x)   0
 
#define FMT_NOINLINE
 
#define FMT_MSC_DEFAULT
 
#define FMT_THROW(x)
 
#define FMT_TRY   if (true)
 
#define FMT_CATCH(x)   if (false)
 
#define FMT_DEPRECATED   /* deprecated */
 
#define FMT_DEPRECATED_ALIAS   FMT_DEPRECATED
 
#define FMT_USE_USER_DEFINED_LITERALS   0
 
#define FMT_REDUCE_INT_INSTANTIATIONS   0
 
#define FMT_CONSTEXPR20
 
#define FMT_USE_FULL_CACHE_DRAGONBOX   0
 
#define FMT_POWERS_OF_10(factor)
 
#define FMT_INC(T)   (((sizeof(#T) - 1ull) << 32) - T)
 
#define FMT_STRING_IMPL(s, base, explicit)
 
#define FMT_STRING(s)   FMT_STRING_IMPL(s, fmt::compile_string, )
 
#define FMT_FORMAT_AS(Type, Base)
 
#define FMT_FUNC
 

Typedefs

using detail::uintptr_t = fallback_uintptr
 
template<typename T >
using detail::iterator_t = decltype(std::begin(std::declval< T & >()))
 
template<typename T >
using detail::sentinel_t = decltype(std::end(std::declval< T & >()))
 
template<typename T >
using detail::checked_ptr = T *
 
template<typename OutputIt >
using detail::reserve_iterator = remove_reference_t< decltype(reserve(std::declval< OutputIt & >(), 0))>
 
template<typename T >
using detail::is_fast_float = bool_constant< std::numeric_limits< T >::is_iec559 &&sizeof(T)<=sizeof(double)>
 
using memory_buffer = basic_memory_buffer< char >
 
template<typename T >
using is_signed = std::integral_constant< bool, std::numeric_limits< T >::is_signed||std::is_same< T, int128_t >::value >
 
template<typename T >
using uint32_or_64_or_128_t = conditional_t< num_bits< T >()<=32 &&!FMT_REDUCE_INT_INSTANTIATIONS, uint32_t, conditional_t< num_bits< T >()<=64, uint64_t, uint128_t > >
 
template<typename T >
using uint64_or_128_t = conditional_t< num_bits< T >()<=64, uint64_t, uint128_t >
 
template<typename T >
using is_integer = bool_constant< is_integral< T >::value &&!std::is_same< T, bool >::value &&!std::is_same< T, char >::value &&!std::is_same< T, wchar_t >::value >
 
using format_func = void(*)(detail::buffer< char > &, int, const char *)
 
using FMT_DEPRECATED_ALIAS = join_view< It, Sentinel, Char >
 

Enumerations

enum  detail::char8_type : unsigned char
 
enum  { inline_buffer_size = 500 }
 

Functions

template<typename Dest , typename Source >
auto detail::bit_cast (const Source &source) -> Dest
 
auto detail::is_big_endian () -> bool
 
auto detail::to_uintptr (const void *p) -> fallback_uintptr
 
template<typename T >
constexpr auto detail::max_value () -> T
 
template<typename T >
constexpr auto detail::num_bits () -> int
 
template<>
constexpr auto detail::num_bits< int128_t > () -> int
 
template<>
constexpr auto detail::num_bits< uint128_t > () -> int
 
template<>
constexpr auto detail::num_bits< fallback_uintptr > () -> int
 
FMT_INLINE void detail::assume (bool condition)
 
template<typename Char >
auto detail::get_data (std::basic_string< Char > &s) -> Char *
 
template<typename Container >
auto detail::get_data (Container &c) -> typename Container::value_type *
 
template<typename T >
auto detail::make_checked (T *p, size_t) -> T *
 
template<typename Container , FMT_ENABLE_IF(is_contiguous< Container >::value) >
auto detail::reserve (std::back_insert_iterator< Container > it, size_t n) -> checked_ptr< typename Container::value_type >
 
template<typename T >
auto detail::reserve (buffer_appender< T > it, size_t n) -> buffer_appender< T >
 
template<typename Iterator >
constexpr auto detail::reserve (Iterator &it, size_t) -> Iterator &
 
template<typename T , typename OutputIt >
constexpr auto detail::to_pointer (OutputIt, size_t) -> T *
 
template<typename T >
auto detail::to_pointer (buffer_appender< T > it, size_t n) -> T *
 
template<typename Container , FMT_ENABLE_IF(is_contiguous< Container >::value) >
auto detail::base_iterator (std::back_insert_iterator< Container > &it, checked_ptr< typename Container::value_type >) -> std::back_insert_iterator< Container >
 
template<typename Iterator >
constexpr auto detail::base_iterator (Iterator, Iterator it) -> Iterator
 
template<typename OutputIt , typename Size , typename T >
FMT_CONSTEXPR auto detail::fill_n (OutputIt out, Size count, const T &value) -> OutputIt
 
template<typename T , typename Size >
FMT_CONSTEXPR20 auto detail::fill_n (T *out, Size count, char value) -> T *
 
template<typename OutChar , typename InputIt , typename OutputIt >
FMT_CONSTEXPR FMT_NOINLINE auto detail::copy_str_noinline (InputIt begin, InputIt end, OutputIt out) -> OutputIt
 
FMT_CONSTEXPR auto detail::utf8_decode (const char *s, uint32_t *c, int *e) -> const char *
 
template<typename F >
FMT_CONSTEXPR void detail::for_each_codepoint (string_view s, F f)
 
template<typename Char >
auto detail::compute_width (basic_string_view< Char > s) -> size_t
 
FMT_CONSTEXPR size_t detail::compute_width (string_view s)
 
auto detail::compute_width (basic_string_view< char8_type > s) -> size_t
 
template<typename Char >
auto detail::code_point_index (basic_string_view< Char > s, size_t n) -> size_t
 
auto detail::code_point_index (basic_string_view< char8_type > s, size_t n) -> size_t
 
FMT_FUNC void detail::print (std::FILE *f, string_view text)
 
template<typename... Args, typename S , typename Char = char_t<S>>
FMT_INLINE auto make_args_checked (const S &fmt, const remove_reference_t< Args > &... args) -> format_arg_store< buffer_context< Char >, remove_reference_t< Args >... >
 
template<typename Char , size_t N>
constexpr auto detail_exported::compile_string_to_view (const Char(&s)[N]) -> basic_string_view< Char >
 
template<typename Char >
constexpr auto detail_exported::compile_string_to_view (detail::std_string_view< Char > s) -> basic_string_view< Char >
 
FMT_BEGIN_DETAIL_NAMESPACE void throw_format_error (const char *message)
 
template<typename T , FMT_ENABLE_IF(is_signed< T >::value) >
FMT_CONSTEXPR auto is_negative (T value) -> bool
 
template<typename T , FMT_ENABLE_IF(std::is_floating_point< T >::value) >
FMT_CONSTEXPR auto is_supported_floating_point (T) -> uint16_t
 
template<typename T >
FMT_CONSTEXPR auto count_digits_fallback (T n) -> int
 
FMT_CONSTEXPR20 auto count_digits (uint64_t n) -> int
 
template<int BITS, typename UInt >
FMT_CONSTEXPR auto count_digits (UInt n) -> int
 
template<>
auto count_digits< 4 > (detail::fallback_uintptr n) -> int
 
FMT_INLINE uint64_t count_digits_inc (int n)
 
FMT_CONSTEXPR20 auto count_digits (uint32_t n) -> int
 
template<typename Int >
constexpr auto digits10 () FMT_NOEXCEPT -> int
 
template<>
constexpr auto digits10< int128_t > () FMT_NOEXCEPT -> int
 
template<>
constexpr auto digits10< uint128_t > () FMT_NOEXCEPT -> int
 
template<typename Char >
FMT_API auto thousands_sep_impl (locale_ref loc) -> thousands_sep_result< Char >
 
template<typename Char >
auto thousands_sep (locale_ref loc) -> thousands_sep_result< Char >
 
template<>
auto thousands_sep (locale_ref loc) -> thousands_sep_result< wchar_t >
 
template<typename Char >
FMT_API auto decimal_point_impl (locale_ref loc) -> Char
 
template<typename Char >
auto decimal_point (locale_ref loc) -> Char
 
template<>
auto decimal_point (locale_ref loc) -> wchar_t
 
template<typename Char >
auto equal2 (const Char *lhs, const char *rhs) -> bool
 
auto equal2 (const char *lhs, const char *rhs) -> bool
 
template<typename Char >
void copy2 (Char *dst, const char *src)
 
FMT_INLINE void copy2 (char *dst, const char *src)
 
template<typename Char , typename UInt >
FMT_CONSTEXPR20 auto format_decimal (Char *out, UInt value, int size) -> format_decimal_result< Char * >
 
template<typename Char , typename UInt , typename Iterator , FMT_ENABLE_IF(!std::is_pointer< remove_cvref_t< Iterator > >::value) >
auto format_decimal (Iterator out, UInt value, int size) -> format_decimal_result< Iterator >
 
template<unsigned BASE_BITS, typename Char , typename UInt >
FMT_CONSTEXPR auto format_uint (Char *buffer, UInt value, int num_digits, bool upper=false) -> Char *
 
template<unsigned BASE_BITS, typename Char >
auto format_uint (Char *buffer, detail::fallback_uintptr n, int num_digits, bool=false) -> Char *
 
template<unsigned BASE_BITS, typename Char , typename It , typename UInt >
auto format_uint (It out, UInt value, int num_digits, bool upper=false) -> It
 
template<typename T >
FMT_API auto dragonbox::to_decimal (T x) FMT_NOEXCEPT -> decimal_fp< T >
 
template<typename T >
constexpr auto exponent_mask () -> typename dragonbox::float_info< T >::carrier_uint
 
template<typename Char , typename It >
auto write_exponent (int exp, It it) -> It
 
template<typename T >
auto format_float (T value, int precision, float_specs specs, buffer< char > &buf) -> int
 
template<typename T >
auto snprintf_float (T value, int precision, float_specs specs, buffer< char > &buf) -> int
 
template<typename T >
auto promote_float (T value) -> T
 
auto promote_float (float value) -> double
 
template<typename OutputIt , typename Char >
FMT_NOINLINE FMT_CONSTEXPR auto fill (OutputIt it, size_t n, const fill_t< Char > &fill) -> OutputIt
 
template<align::type align = align::left, typename OutputIt , typename Char , typename F >
FMT_CONSTEXPR auto write_padded (OutputIt out, const basic_format_specs< Char > &specs, size_t size, size_t width, F &&f) -> OutputIt
 
template<align::type align = align::left, typename OutputIt , typename Char , typename F >
constexpr auto write_padded (OutputIt out, const basic_format_specs< Char > &specs, size_t size, F &&f) -> OutputIt
 
template<align::type align = align::left, typename Char , typename OutputIt >
FMT_CONSTEXPR auto write_bytes (OutputIt out, string_view bytes, const basic_format_specs< Char > &specs) -> OutputIt
 
template<typename Char , typename OutputIt , typename UIntPtr >
auto write_ptr (OutputIt out, UIntPtr value, const basic_format_specs< Char > *specs) -> OutputIt
 
template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write_char (OutputIt out, Char value, const basic_format_specs< Char > &specs) -> OutputIt
 
template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write (OutputIt out, Char value, const basic_format_specs< Char > &specs, locale_ref loc={}) -> OutputIt
 
template<typename OutputIt , typename Char , typename W >
FMT_CONSTEXPR FMT_INLINE auto write_int (OutputIt out, int num_digits, unsigned prefix, const basic_format_specs< Char > &specs, W write_digits) -> OutputIt
 
template<typename OutputIt , typename UInt , typename Char >
auto write_int_localized (OutputIt &out, UInt value, unsigned prefix, const basic_format_specs< Char > &specs, locale_ref loc) -> bool
 
FMT_CONSTEXPR void prefix_append (unsigned &prefix, unsigned value)
 
template<typename T >
FMT_CONSTEXPR auto make_write_int_arg (T value, sign_t sign) -> write_int_arg< uint32_or_64_or_128_t< T > >
 
template<typename Char , typename OutputIt , typename T >
FMT_CONSTEXPR FMT_INLINE auto write_int (OutputIt out, write_int_arg< T > arg, const basic_format_specs< Char > &specs, locale_ref loc) -> OutputIt
 
template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_integral< T >::value && !std::is_same< T, bool >::value && std::is_same< OutputIt, buffer_appender< Char > >::value) >
FMT_CONSTEXPR auto write (OutputIt out, T value, const basic_format_specs< Char > &specs, locale_ref loc) -> OutputIt
 
template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_integral< T >::value && !std::is_same< T, bool >::value && !std::is_same< OutputIt, buffer_appender< Char > >::value) >
FMT_CONSTEXPR FMT_INLINE auto write (OutputIt out, T value, const basic_format_specs< Char > &specs, locale_ref loc) -> OutputIt
 
template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write (OutputIt out, basic_string_view< Char > s, const basic_format_specs< Char > &specs) -> OutputIt
 
template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write (OutputIt out, basic_string_view< type_identity_t< Char > > s, const basic_format_specs< Char > &specs, locale_ref) -> OutputIt
 
template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write (OutputIt out, const Char *s, const basic_format_specs< Char > &specs, locale_ref) -> OutputIt
 
template<typename Char , typename OutputIt >
auto write_nonfinite (OutputIt out, bool isinf, basic_format_specs< Char > specs, const float_specs &fspecs) -> OutputIt
 
auto get_significand_size (const big_decimal_fp &fp) -> int
 
template<typename T >
auto get_significand_size (const dragonbox::decimal_fp< T > &fp) -> int
 
template<typename Char , typename OutputIt >
auto write_significand (OutputIt out, const char *significand, int &significand_size) -> OutputIt
 
template<typename Char , typename OutputIt , typename UInt >
auto write_significand (OutputIt out, UInt significand, int significand_size) -> OutputIt
 
template<typename Char , typename UInt , FMT_ENABLE_IF(std::is_integral< UInt >::value) >
auto write_significand (Char *out, UInt significand, int significand_size, int integral_size, Char decimal_point) -> Char *
 
template<typename OutputIt , typename UInt , typename Char , FMT_ENABLE_IF(!std::is_pointer< remove_cvref_t< OutputIt > >::value) >
auto write_significand (OutputIt out, UInt significand, int significand_size, int integral_size, Char decimal_point) -> OutputIt
 
template<typename OutputIt , typename Char >
auto write_significand (OutputIt out, const char *significand, int significand_size, int integral_size, Char decimal_point) -> OutputIt
 
template<typename OutputIt , typename DecimalFP , typename Char >
auto write_float (OutputIt out, const DecimalFP &fp, const basic_format_specs< Char > &specs, float_specs fspecs, Char decimal_point) -> OutputIt
 
template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(std::is_floating_point< T >::value) >
auto write (OutputIt out, T value, basic_format_specs< Char > specs, locale_ref loc={}) -> OutputIt
 
template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_fast_float< T >::value) >
auto write (OutputIt out, T value) -> OutputIt
 
template<typename Char , typename OutputIt >
auto write (OutputIt out, monostate, basic_format_specs< Char >={}, locale_ref={}) -> OutputIt
 
template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write (OutputIt out, basic_string_view< Char > value) -> OutputIt
 
template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_string< T >::value) >
constexpr auto write (OutputIt out, const T &value) -> OutputIt
 
template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_integral< T >::value && !std::is_same< T, bool >::value && !std::is_same< T, Char >::value) >
FMT_CONSTEXPR auto write (OutputIt out, T value) -> OutputIt
 
template<typename Char , typename OutputIt , typename T , bool check = std::is_enum<T>::value && !std::is_same<T, Char>::value && mapped_type_constant<T, basic_format_context<OutputIt, Char>>::value != type::custom_type, FMT_ENABLE_IF(check) >
FMT_CONSTEXPR auto write (OutputIt out, T value) -> OutputIt
 
template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write (OutputIt out, Char value) -> OutputIt
 
template<typename Char , typename OutputIt >
FMT_CONSTEXPR_CHAR_TRAITS auto write (OutputIt out, const Char *value) -> OutputIt
 
template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(std::is_same< T, void >::value) >
auto write (OutputIt out, const T *value, const basic_format_specs< Char > &specs={}, locale_ref={}) -> OutputIt
 
template<typename Char , typename OutputIt , typename T >
FMT_CONSTEXPR auto write (OutputIt out, const T &value) -> typename std::enable_if< mapped_type_constant< T, basic_format_context< OutputIt, Char > >::value==type::custom_type, OutputIt >::type
 
template<template< typename > class Handler, typename FormatArg , typename ErrorHandler >
FMT_CONSTEXPR auto get_dynamic_spec (FormatArg arg, ErrorHandler eh) -> int
 
template<typename Context , typename ID >
FMT_CONSTEXPR auto get_arg (Context &ctx, ID id) -> typename Context::format_arg
 
template<template< typename > class Handler, typename Context >
FMT_CONSTEXPR void handle_dynamic_spec (int &value, arg_ref< typename Context::char_type > ref, Context &ctx)
 
template<typename Locale , typename Char >
auto vformat (const Locale &loc, basic_string_view< Char > format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args) -> std::basic_string< Char >
 
FMT_API void format_error_code (buffer< char > &out, int error_code, string_view message) FMT_NOEXCEPT
 
FMT_API void report_error (format_func func, int error_code, const char *message) FMT_NOEXCEPT
 
FMT_END_DETAIL_NAMESPACE FMT_API auto vsystem_error (int error_code, string_view format_str, format_args args) -> std::system_error
 
template<typename... T>
auto system_error (int error_code, format_string< T... > fmt, T &&... args) -> std::system_error
 
FMT_API void format_system_error (detail::buffer< char > &out, int error_code, const char *message) FMT_NOEXCEPT
 
FMT_API void report_system_error (int error_code, const char *message) FMT_NOEXCEPT
 
 FMT_FORMAT_AS (signed char, int)
 
 FMT_FORMAT_AS (unsigned char, unsigned)
 
 FMT_FORMAT_AS (short, int)
 
 FMT_FORMAT_AS (unsigned short, unsigned)
 
 FMT_FORMAT_AS (long, long long)
 
 FMT_FORMAT_AS (unsigned long, unsigned long long)
 
 FMT_FORMAT_AS (Char *, const Char *)
 
 FMT_FORMAT_AS (std::basic_string< Char >, basic_string_view< Char >)
 
 FMT_FORMAT_AS (std::nullptr_t, const void *)
 
 FMT_FORMAT_AS (detail::std_string_view< Char >, basic_string_view< Char >)
 
template<typename T >
auto ptr (T p) -> const void *
 
template<typename T >
auto ptr (const std::unique_ptr< T > &p) -> const void *
 
template<typename T >
auto ptr (const std::shared_ptr< T > &p) -> const void *
 
template<typename It , typename Sentinel >
auto join (It begin, Sentinel end, string_view sep) -> join_view< It, Sentinel >
 
template<typename Range >
auto join (Range &&range, string_view sep) -> join_view< detail::iterator_t< Range >, detail::sentinel_t< Range > >
 
template<typename T , FMT_ENABLE_IF(!std::is_integral< T >::value) >
auto to_string (const T &value) -> std::string
 
template<typename T , FMT_ENABLE_IF(std::is_integral< T >::value) >
auto to_string (T value) -> std::string
 
template<typename Char , size_t SIZE>
auto to_string (const basic_memory_buffer< Char, SIZE > &buf) -> std::basic_string< Char >
 
template<typename Char >
FMT_BEGIN_DETAIL_NAMESPACE 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)
 
template FMT_API auto thousands_sep_impl< char > (locale_ref) -> thousands_sep_result< char >
 
template FMT_API auto thousands_sep_impl< wchar_t > (locale_ref) -> thousands_sep_result< wchar_t >
 
template FMT_API auto decimal_point_impl (locale_ref) -> char
 
template auto format_float< double > (double value, int precision, float_specs specs, buffer< char > &buf) -> int
 
template auto format_float< long double > (long double value, int precision, float_specs specs, buffer< char > &buf) -> int
 
void snprintf_float (float, int, float_specs, buffer< char > &)=delete
 
template auto snprintf_float< double > (double value, int precision, float_specs specs, buffer< char > &buf) -> int
 
template auto snprintf_float< long double > (long double value, int precision, float_specs specs, buffer< char > &buf) -> int
 
template<typename Locale , FMT_ENABLE_IF(detail::is_locale< Locale >::value) >
FMT_END_DETAIL_NAMESPACE auto vformat (const Locale &loc, string_view fmt, format_args args) -> std::string
 
template<typename Locale , typename... T, FMT_ENABLE_IF(detail::is_locale< Locale >::value) >
auto format (const Locale &loc, format_string< T... > fmt, T &&... args) -> std::string
 
template<typename... T, size_t SIZE, typename Allocator >
FMT_DEPRECATED auto format_to (basic_memory_buffer< char, SIZE, Allocator > &buf, format_string< T... > fmt, T &&... args) -> appender
 
template<typename OutputIt , typename Locale , FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, char >::value && detail::is_locale< Locale >::value) >
auto vformat_to (OutputIt out, const Locale &loc, string_view fmt, format_args args) -> OutputIt
 
template<typename OutputIt , typename Locale , typename... T, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, char >::value && detail::is_locale< Locale >::value) >
FMT_INLINE auto format_to (OutputIt out, const Locale &loc, format_string< T... > fmt, T &&... args) -> OutputIt
 

Macro Definition Documentation

◆ FMT_CATCH

#define FMT_CATCH (   x)    if (false)

Definition at line 108 of file format.h.

◆ FMT_CONSTEXPR20

#define FMT_CONSTEXPR20

Definition at line 254 of file format.h.

◆ FMT_CUDA_VERSION

#define FMT_CUDA_VERSION   0

Definition at line 57 of file format.h.

◆ FMT_DEPRECATED

#define FMT_DEPRECATED   /* deprecated */

Definition at line 120 of file format.h.

◆ FMT_DEPRECATED_ALIAS

Definition at line 129 of file format.h.

◆ FMT_FORMAT_AS

#define FMT_FORMAT_AS (   Type,
  Base 
)
Value:
template <typename Char> \
struct formatter<Type, Char> : formatter<Base, Char> { \
template <typename FormatContext> \
auto format(Type const& val, FormatContext& ctx) const \
-> decltype(ctx.out()) { \
return formatter<Base, Char>::format(static_cast<Base>(val), ctx); \
} \
}
FMT_INLINE auto format(format_string< T... > fmt, T &&... args) -> std::string
Definition core.h:2885

Definition at line 2352 of file format.h.

◆ FMT_FUNC

#define FMT_FUNC

Definition at line 2827 of file format.h.

◆ FMT_HAS_BUILTIN

#define FMT_HAS_BUILTIN (   x)    0

Definition at line 63 of file format.h.

◆ FMT_ICC_VERSION

#define FMT_ICC_VERSION   0

Definition at line 51 of file format.h.

◆ FMT_INC

#define FMT_INC (   T)    (((sizeof(#T) - 1ull) << 32) - T)

◆ FMT_MSC_DEFAULT

#define FMT_MSC_DEFAULT

Definition at line 75 of file format.h.

◆ FMT_NOINLINE

#define FMT_NOINLINE

Definition at line 69 of file format.h.

◆ FMT_POWERS_OF_10

#define FMT_POWERS_OF_10 (   factor)
Value:
factor * 10, (factor)*100, (factor)*1000, (factor)*10000, (factor)*100000, \
(factor)*1000000, (factor)*10000000, (factor)*100000000, \
(factor)*1000000000

Definition at line 851 of file format.h.

◆ FMT_REDUCE_INT_INSTANTIATIONS

#define FMT_REDUCE_INT_INSTANTIATIONS   0

Definition at line 148 of file format.h.

◆ FMT_STRING

#define FMT_STRING (   s)    FMT_STRING_IMPL(s, fmt::compile_string, )

\rst Constructs a compile-time format string from a string literal s.

Example**::

A compile-time error because 'd' is an invalid specifier for strings. std::string s = fmt::format(FMT_STRING("{:d}"), "foo"); \endrst

Definition at line 2155 of file format.h.

◆ FMT_STRING_IMPL

#define FMT_STRING_IMPL (   s,
  base,
  explicit 
)
Value:
[] { \
/* Use the hidden visibility as a workaround for a GCC bug (#1973). */ \
/* Use a macro-like name to avoid shadowing warnings. */ \
struct FMT_GCC_VISIBILITY_HIDDEN FMT_COMPILE_STRING : base { \
using char_type = fmt::remove_cvref_t<decltype(s[0])>; \
operator fmt::basic_string_view<char_type>() const { \
return fmt::detail_exported::compile_string_to_view<char_type>(s); \
} \
}; \
return FMT_COMPILE_STRING(); \
}()
#define FMT_MAYBE_UNUSED
Definition core.h:173
#define FMT_GCC_VISIBILITY_HIDDEN
Definition core.h:270
#define FMT_CONSTEXPR
Definition core.h:99
@ char_type

Definition at line 2131 of file format.h.

◆ FMT_THROW

#define FMT_THROW (   x)
Value:
do { \
FMT_ASSERT(false, (x).what()); \
} while (false)

Definition at line 96 of file format.h.

◆ FMT_TRY

#define FMT_TRY   if (true)

Definition at line 107 of file format.h.

◆ FMT_USE_FULL_CACHE_DRAGONBOX

#define FMT_USE_FULL_CACHE_DRAGONBOX   0

Definition at line 572 of file format.h.

◆ FMT_USE_USER_DEFINED_LITERALS

#define FMT_USE_USER_DEFINED_LITERALS   0

Definition at line 139 of file format.h.

Typedef Documentation

◆ FMT_DEPRECATED_ALIAS

using FMT_DEPRECATED_ALIAS = join_view<It, Sentinel, Char>

Definition at line 2507 of file format.h.

◆ format_func

using format_func = void (*)(detail::buffer<char>&, int, const char*)

Definition at line 2213 of file format.h.

◆ is_integer

Definition at line 2010 of file format.h.

◆ is_signed

Definition at line 819 of file format.h.

◆ memory_buffer

Definition at line 736 of file format.h.

◆ uint32_or_64_or_128_t

template<typename T >
using uint32_or_64_or_128_t = conditional_t<num_bits<T>() <= 32 && !FMT_REDUCE_INT_INSTANTIATIONS, uint32_t, conditional_t<num_bits<T>() <= 64, uint64_t, uint128_t> >

Definition at line 844 of file format.h.

◆ uint64_or_128_t

template<typename T >
using uint64_or_128_t = conditional_t<num_bits<T>() <= 64, uint64_t, uint128_t>

Definition at line 849 of file format.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
inline_buffer_size 

Definition at line 599 of file format.h.

Function Documentation

◆ copy2() [1/2]

template<typename Char >
void copy2 ( Char *  dst,
const char src 
)

Definition at line 1035 of file format.h.

◆ copy2() [2/2]

FMT_INLINE void copy2 ( char dst,
const char src 
)

Definition at line 1039 of file format.h.

◆ count_digits() [1/3]

template<int BITS, typename UInt >
FMT_CONSTEXPR auto count_digits ( UInt  n) -> int

Definition at line 943 of file format.h.

◆ count_digits() [2/3]

FMT_CONSTEXPR20 auto count_digits ( uint32_t  n) -> int
inline

Definition at line 980 of file format.h.

◆ count_digits() [3/3]

FMT_CONSTEXPR20 auto count_digits ( uint64_t  n) -> int
inline

Definition at line 921 of file format.h.

◆ count_digits< 4 >()

template<>
auto count_digits< 4 > ( detail::fallback_uintptr  n) -> int

◆ count_digits_fallback()

template<typename T >
FMT_CONSTEXPR auto count_digits_fallback ( T  n) -> int

Definition at line 899 of file format.h.

◆ count_digits_inc()

FMT_INLINE uint64_t count_digits_inc ( int  n)

Definition at line 959 of file format.h.

◆ decimal_point() [1/2]

template<typename Char >
auto decimal_point ( locale_ref  loc) -> Char
inline

Definition at line 1019 of file format.h.

◆ decimal_point() [2/2]

template<>
auto decimal_point ( locale_ref  loc) -> wchar_t
inline

Definition at line 1022 of file format.h.

◆ decimal_point_impl() [1/2]

template<typename Char >
template FMT_API auto decimal_point_impl ( locale_ref  loc) -> Char

◆ decimal_point_impl() [2/2]

template FMT_API auto decimal_point_impl ( locale_ref  ) -> char
extern

◆ digits10()

template<typename Int >
constexpr auto digits10 ( ) -> int
constexpr

Definition at line 990 of file format.h.

◆ digits10< int128_t >()

template<>
constexpr auto digits10< int128_t > ( ) -> int
constexpr

Definition at line 993 of file format.h.

◆ digits10< uint128_t >()

template<>
constexpr auto digits10< uint128_t > ( ) -> int
constexpr

Definition at line 996 of file format.h.

◆ equal2() [1/2]

template<typename Char >
auto equal2 ( const Char *  lhs,
const char rhs 
) -> bool

Definition at line 1027 of file format.h.

◆ equal2() [2/2]

auto equal2 ( const char lhs,
const char rhs 
) -> bool
inline

Definition at line 1030 of file format.h.

◆ exponent_mask()

template<typename T >
constexpr auto exponent_mask ( ) -> typename dragonbox::float_info<T>::carrier_uint
constexpr

Definition at line 1220 of file format.h.

◆ fill()

template<typename OutputIt , typename Char >
FMT_NOINLINE FMT_CONSTEXPR auto fill ( OutputIt  it,
size_t  n,
const fill_t< Char > &  fill 
) -> OutputIt

Definition at line 1264 of file format.h.

◆ FMT_FORMAT_AS() [1/10]

FMT_FORMAT_AS ( Char *  ,
const Char *   
)

◆ FMT_FORMAT_AS() [2/10]

FMT_FORMAT_AS ( detail::std_string_view< Char >  ,
basic_string_view< Char >   
)

◆ FMT_FORMAT_AS() [3/10]

FMT_FORMAT_AS ( long  ,
long long   
)

◆ FMT_FORMAT_AS() [4/10]

FMT_FORMAT_AS ( short  ,
int   
)

◆ FMT_FORMAT_AS() [5/10]

FMT_FORMAT_AS ( signed char  ,
int   
)

◆ FMT_FORMAT_AS() [6/10]

FMT_FORMAT_AS ( std::basic_string< Char >  ,
basic_string_view< Char >   
)

◆ FMT_FORMAT_AS() [7/10]

FMT_FORMAT_AS ( std::nullptr_t  ,
const void *   
)

◆ FMT_FORMAT_AS() [8/10]

FMT_FORMAT_AS ( unsigned char  ,
unsigned   
)

◆ FMT_FORMAT_AS() [9/10]

FMT_FORMAT_AS ( unsigned long  ,
unsigned long long   
)

◆ FMT_FORMAT_AS() [10/10]

FMT_FORMAT_AS ( unsigned short  ,
unsigned   
)

◆ format()

template<typename Locale , typename... T, FMT_ENABLE_IF(detail::is_locale< Locale >::value) >
auto format ( const Locale &  loc,
format_string< T... >  fmt,
T &&...  args 
) -> std::string
inline

Definition at line 2784 of file format.h.

◆ format_decimal() [1/2]

template<typename Char , typename UInt >
FMT_CONSTEXPR20 auto format_decimal ( Char *  out,
UInt  value,
int  size 
) -> format_decimal_result<Char*>

Definition at line 1050 of file format.h.

◆ format_decimal() [2/2]

template<typename Char , typename UInt , typename Iterator , FMT_ENABLE_IF(!std::is_pointer< remove_cvref_t< Iterator > >::value) >
auto format_decimal ( Iterator  out,
UInt  value,
int  size 
) -> format_decimal_result<Iterator>
inline

Definition at line 1082 of file format.h.

◆ format_error_code()

FMT_API void format_error_code ( buffer< char > &  out,
int  error_code,
string_view  message 
)

◆ format_float()

template<typename T >
auto format_float ( T  value,
int  precision,
float_specs  specs,
buffer< char > &  buf 
) -> int

◆ format_float< double >()

template auto format_float< double > ( double  value,
int  precision,
float_specs  specs,
buffer< char > &  buf 
) -> int
extern

◆ format_float< long double >()

template auto format_float< long double > ( long double  value,
int  precision,
float_specs  specs,
buffer< char > &  buf 
) -> int
extern

◆ format_system_error()

FMT_API void format_system_error ( detail::buffer< char > &  out,
int  error_code,
const char message 
)

\rst Formats an error message for an error returned by an operating system or a language runtime, for example a file opening error, and writes it to out. The format is the same as the one used by std::system_error(ec, message) where ec is std::error_code(error_code, std::generic_category()}). It is implementation-defined but normally looks like:

.. parsed-literal:: <message>*: *<system-message>*

where *<message>* is the passed message and *<system-message>* is the system message corresponding to the error code. error_code* is a system error code as given by errno. \endrst

Definition at line 2541 of file format-inl.h.

◆ format_to() [1/2]

template<typename... T, size_t SIZE, typename Allocator >
FMT_DEPRECATED auto format_to ( basic_memory_buffer< char, SIZE, Allocator > &  buf,
format_string< T... >  fmt,
T &&...  args 
) -> appender

Definition at line 2790 of file format.h.

◆ format_to() [2/2]

template<typename OutputIt , typename Locale , typename... T, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, char >::value && detail::is_locale< Locale >::value) >
FMT_INLINE auto format_to ( OutputIt  out,
const Locale &  loc,
format_string< T... >  fmt,
T &&...  args 
) -> OutputIt

Definition at line 2811 of file format.h.

◆ format_uint() [1/3]

template<unsigned BASE_BITS, typename Char >
auto format_uint ( Char *  buffer,
detail::fallback_uintptr  n,
int  num_digits,
bool  = false 
) -> Char*

Definition at line 1105 of file format.h.

◆ format_uint() [2/3]

template<unsigned BASE_BITS, typename Char , typename UInt >
FMT_CONSTEXPR auto format_uint ( Char *  buffer,
UInt  value,
int  num_digits,
bool  upper = false 
) -> Char*

Definition at line 1091 of file format.h.

◆ format_uint() [3/3]

template<unsigned BASE_BITS, typename Char , typename It , typename UInt >
auto format_uint ( It  out,
UInt  value,
int  num_digits,
bool  upper = false 
) -> It
inline

Definition at line 1127 of file format.h.

◆ get_arg()

template<typename Context , typename ID >
FMT_CONSTEXPR auto get_arg ( Context &  ctx,
ID  id 
) -> typename Context::format_arg

Definition at line 2064 of file format.h.

◆ get_dynamic_spec()

template<template< typename > class Handler, typename FormatArg , typename ErrorHandler >
FMT_CONSTEXPR auto get_dynamic_spec ( FormatArg  arg,
ErrorHandler  eh 
) -> int

Definition at line 2057 of file format.h.

◆ get_significand_size() [1/2]

auto get_significand_size ( const big_decimal_fp fp) -> int
inline

Definition at line 1609 of file format.h.

◆ get_significand_size() [2/2]

template<typename T >
auto get_significand_size ( const dragonbox::decimal_fp< T > &  fp) -> int
inline

Definition at line 1613 of file format.h.

◆ handle_dynamic_spec()

template<template< typename > class Handler, typename Context >
FMT_CONSTEXPR void handle_dynamic_spec ( int value,
arg_ref< typename Context::char_type >  ref,
Context &  ctx 
)

Definition at line 2114 of file format.h.

◆ is_negative()

template<typename T , FMT_ENABLE_IF(is_signed< T >::value) >
FMT_CONSTEXPR auto is_negative ( T  value) -> bool

Definition at line 826 of file format.h.

◆ is_supported_floating_point()

template<typename T , FMT_ENABLE_IF(std::is_floating_point< T >::value) >
FMT_CONSTEXPR auto is_supported_floating_point ( T  ) -> uint16_t

Definition at line 835 of file format.h.

◆ join() [1/2]

template<typename It , typename Sentinel >
auto join ( It  begin,
Sentinel  end,
string_view  sep 
) -> join_view<It, Sentinel>

Returns an object that formats the iterator range [begin, end) with elements separated by sep.

Definition at line 2562 of file format.h.

◆ join() [2/2]

template<typename Range >
auto join ( Range &&  range,
string_view  sep 
) -> join_view<detail::iterator_t<Range>, detail::sentinel_t<Range>>

\rst Returns an object that formats range with elements separated by sep.

Example**::

std::vector<int> v = {1, 2, 3}; fmt::print("{}", fmt::join(v, ", ")); Output: "1, 2, 3"

fmt::join applies passed format specifiers to the range elements::

fmt::print("{:02}", fmt::join(v, ", ")); Output: "01, 02, 03" \endrst

Definition at line 2583 of file format.h.

◆ make_args_checked()

template<typename... Args, typename S , typename Char = char_t<S>>
FMT_INLINE auto make_args_checked ( const S &  fmt,
const remove_reference_t< Args > &...  args 
) -> format_arg_store<buffer_context<Char>, remove_reference_t<Args>...>

\rst Constructs a ~fmtformat_arg_store object that contains references to arguments and can be implicitly converted to ~fmtformat_args. If fmt is a compile-time string then make_args_checked checks its validity at compile time. \endrst

Definition at line 769 of file format.h.

◆ make_write_int_arg()

template<typename T >
FMT_CONSTEXPR auto make_write_int_arg ( T  value,
sign_t  sign 
) -> write_int_arg<uint32_or_64_or_128_t<T>>

Definition at line 1460 of file format.h.

◆ prefix_append()

FMT_CONSTEXPR void prefix_append ( unsigned &  prefix,
unsigned  value 
)
inline

Definition at line 1449 of file format.h.

◆ promote_float() [1/2]

auto promote_float ( float  value) -> double
inline

Definition at line 1259 of file format.h.

◆ promote_float() [2/2]

template<typename T >
auto promote_float ( T  value) -> T

Definition at line 1258 of file format.h.

◆ ptr() [1/3]

template<typename T >
auto ptr ( const std::shared_ptr< T > &  p) -> const void*

Definition at line 2458 of file format.h.

◆ ptr() [2/3]

template<typename T >
auto ptr ( const std::unique_ptr< T > &  p) -> const void*

Definition at line 2455 of file format.h.

◆ ptr() [3/3]

template<typename T >
auto ptr ( T  p) -> const void*

\rst Converts p to const void* for pointer formatting.

Example**::

auto s = fmt::format("{}", fmt::ptr(p)); \endrst

Definition at line 2451 of file format.h.

◆ report_error()

FMT_API void report_error ( format_func  func,
int  error_code,
const char message 
)

◆ report_system_error()

FMT_API void report_system_error ( int  error_code,
const char message 
)

Definition at line 2556 of file format-inl.h.

◆ snprintf_float() [1/2]

void snprintf_float ( float  ,
int  ,
float_specs  ,
buffer< char > &   
)
delete

◆ snprintf_float() [2/2]

template<typename T >
auto snprintf_float ( T  value,
int  precision,
float_specs  specs,
buffer< char > &  buf 
) -> int

◆ snprintf_float< double >()

template auto snprintf_float< double > ( double  value,
int  precision,
float_specs  specs,
buffer< char > &  buf 
) -> int
extern

◆ snprintf_float< long double >()

template auto snprintf_float< long double > ( long double  value,
int  precision,
float_specs  specs,
buffer< char > &  buf 
) -> int
extern

◆ system_error()

template<typename... T>
auto system_error ( int  error_code,
format_string< T... >  fmt,
T &&...  args 
) -> std::system_error

\rst Constructs :class:std::system_error with a message formatted with fmt::format(fmt, args...). error_code* is a system error code as given by errno.

Example**::

This throws std::system_error with the description cannot open file 'madeup': No such file or directory or similar (system message may vary). const char* filename = "madeup"; std::FILE* file = std::fopen(filename, "r"); if (!file) throw fmt::system_error(errno, "cannot open file '{}'", filename); \endrst

Definition at line 2243 of file format.h.

◆ thousands_sep() [1/2]

template<typename Char >
auto thousands_sep ( locale_ref  loc) -> thousands_sep_result<Char>
inline

Definition at line 1008 of file format.h.

◆ thousands_sep() [2/2]

template<>
auto thousands_sep ( locale_ref  loc) -> thousands_sep_result<wchar_t>
inline

Definition at line 1013 of file format.h.

◆ thousands_sep_impl()

template<typename Char >
FMT_API auto thousands_sep_impl ( locale_ref  loc) -> thousands_sep_result< Char >

◆ thousands_sep_impl< char >()

template FMT_API auto thousands_sep_impl< char > ( locale_ref  ) -> thousands_sep_result< char >
extern

◆ thousands_sep_impl< wchar_t >()

◆ throw_format_error()

FMT_BEGIN_DETAIL_NAMESPACE void throw_format_error ( const char message)
inline

Definition at line 810 of file format.h.

◆ to_string() [1/3]

template<typename Char , size_t SIZE>
auto to_string ( const basic_memory_buffer< Char, SIZE > &  buf) -> std::basic_string<Char>

Definition at line 2617 of file format.h.

◆ to_string() [2/3]

template<typename T , FMT_ENABLE_IF(!std::is_integral< T >::value) >
auto to_string ( const T value) -> std::string
inline

\rst Converts value to std::string using the default format for type T.

Example**::

#include <fmt/format.h>

std::string answer = fmt::to_string(42); \endrst

Definition at line 2600 of file format.h.

◆ to_string() [3/3]

template<typename T , FMT_ENABLE_IF(std::is_integral< T >::value) >
auto to_string ( T  value) -> std::string
inline

Definition at line 2607 of file format.h.

◆ vformat() [1/2]

template<typename Locale , typename Char >
auto vformat ( const Locale &  loc,
basic_string_view< Char >  format_str,
basic_format_args< buffer_context< type_identity_t< Char > > >  args 
) -> std::basic_string<Char>

Definition at line 2205 of file format.h.

◆ vformat() [2/2]

template<typename Locale , FMT_ENABLE_IF(detail::is_locale< Locale >::value) >
FMT_END_DETAIL_NAMESPACE auto vformat ( const Locale &  loc,
string_view  fmt,
format_args  args 
) -> std::string
inline

Definition at line 2777 of file format.h.

◆ vformat_to() [1/2]

template<typename Char >
FMT_BEGIN_DETAIL_NAMESPACE 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 at line 2627 of file format.h.

◆ vformat_to() [2/2]

template<typename OutputIt , typename Locale , FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, char >::value && detail::is_locale< Locale >::value) >
auto vformat_to ( OutputIt  out,
const Locale &  loc,
string_view  fmt,
format_args  args 
) -> OutputIt

Definition at line 2800 of file format.h.

◆ vsystem_error()

FMT_END_DETAIL_NAMESPACE FMT_API auto vsystem_error ( int  error_code,
string_view  format_str,
format_args  args 
) -> std::system_error

Definition at line 132 of file format-inl.h.

◆ write() [1/17]

template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write ( OutputIt  out,
basic_string_view< Char >  s,
const basic_format_specs< Char > &  specs 
) -> OutputIt

Definition at line 1554 of file format.h.

◆ write() [2/17]

template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write ( OutputIt  out,
basic_string_view< Char >  value 
) -> OutputIt

Definition at line 1857 of file format.h.

◆ write() [3/17]

template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write ( OutputIt  out,
basic_string_view< type_identity_t< Char > >  s,
const basic_format_specs< Char > &  specs,
locale_ref   
) -> OutputIt

Definition at line 1568 of file format.h.

◆ write() [4/17]

template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write ( OutputIt  out,
Char  value 
) -> OutputIt

Definition at line 1916 of file format.h.

◆ write() [5/17]

template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write ( OutputIt  out,
Char  value,
const basic_format_specs< Char > &  specs,
locale_ref  loc = {} 
) -> OutputIt

Definition at line 1338 of file format.h.

◆ write() [6/17]

template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write ( OutputIt  out,
const Char *  s,
const basic_format_specs< Char > &  specs,
locale_ref   
) -> OutputIt

Definition at line 1576 of file format.h.

◆ write() [7/17]

template<typename Char , typename OutputIt >
FMT_CONSTEXPR_CHAR_TRAITS auto write ( OutputIt  out,
const Char *  value 
) -> OutputIt

Definition at line 1923 of file format.h.

◆ write() [8/17]

template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_string< T >::value) >
constexpr auto write ( OutputIt  out,
const T value 
) -> OutputIt
constexpr

Definition at line 1866 of file format.h.

◆ write() [9/17]

template<typename Char , typename OutputIt , typename T >
FMT_CONSTEXPR auto write ( OutputIt  out,
const T value 
) -> typename std::enable_if< mapped_type_constant<T, basic_format_context<OutputIt, Char>>::value == type::custom_type, OutputIt>::type

Definition at line 1944 of file format.h.

◆ write() [10/17]

template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(std::is_same< T, void >::value) >
auto write ( OutputIt  out,
const T value,
const basic_format_specs< Char > &  specs = {},
locale_ref  = {} 
) -> OutputIt

Definition at line 1936 of file format.h.

◆ write() [11/17]

template<typename Char , typename OutputIt >
auto write ( OutputIt  out,
monostate  ,
basic_format_specs< Char >  = {},
locale_ref  = {} 
) -> OutputIt

Definition at line 1850 of file format.h.

◆ write() [12/17]

template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_fast_float< T >::value) >
auto write ( OutputIt  out,
T  value 
) -> OutputIt
inline

Definition at line 1819 of file format.h.

◆ write() [13/17]

template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_integral< T >::value && !std::is_same< T, bool >::value && !std::is_same< T, Char >::value) >
FMT_CONSTEXPR auto write ( OutputIt  out,
T  value 
) -> OutputIt

Definition at line 1874 of file format.h.

◆ write() [14/17]

template<typename Char , typename OutputIt , typename T , bool check = std::is_enum<T>::value && !std::is_same<T, Char>::value && mapped_type_constant<T, basic_format_context<OutputIt, Char>>::value != type::custom_type, FMT_ENABLE_IF(check) >
FMT_CONSTEXPR auto write ( OutputIt  out,
T  value 
) -> OutputIt

Definition at line 1900 of file format.h.

◆ write() [15/17]

template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(std::is_floating_point< T >::value) >
auto write ( OutputIt  out,
T  value,
basic_format_specs< Char >  specs,
locale_ref  loc = {} 
) -> OutputIt

Definition at line 1770 of file format.h.

◆ write() [16/17]

template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_integral< T >::value && !std::is_same< T, bool >::value && std::is_same< OutputIt, buffer_appender< Char > >::value) >
FMT_CONSTEXPR auto write ( OutputIt  out,
T  value,
const basic_format_specs< Char > &  specs = {},
locale_ref  loc = {} 
) -> OutputIt

Definition at line 1537 of file format.h.

◆ write() [17/17]

template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_integral< T >::value && !std::is_same< T, bool >::value && !std::is_same< OutputIt, buffer_appender< Char > >::value) >
FMT_CONSTEXPR FMT_INLINE auto write ( OutputIt  out,
T  value,
const basic_format_specs< Char > &  specs,
locale_ref  loc 
) -> OutputIt

Definition at line 1547 of file format.h.

◆ write_bytes()

template<align::type align = align::left, typename Char , typename OutputIt >
FMT_CONSTEXPR auto write_bytes ( OutputIt  out,
string_view  bytes,
const basic_format_specs< Char > &  specs 
) -> OutputIt

Definition at line 1304 of file format.h.

◆ write_char()

template<typename Char , typename OutputIt >
FMT_CONSTEXPR auto write_char ( OutputIt  out,
Char  value,
const basic_format_specs< Char > &  specs 
) -> OutputIt

Definition at line 1329 of file format.h.

◆ write_exponent()

template<typename Char , typename It >
auto write_exponent ( int  exp,
It  it 
) -> It

Definition at line 1229 of file format.h.

◆ write_float()

template<typename OutputIt , typename DecimalFP , typename Char >
auto write_float ( OutputIt  out,
const DecimalFP &  fp,
const basic_format_specs< Char > &  specs,
float_specs  fspecs,
Char  decimal_point 
) -> OutputIt

Definition at line 1670 of file format.h.

◆ write_int() [1/2]

template<typename OutputIt , typename Char , typename W >
FMT_CONSTEXPR FMT_INLINE auto write_int ( OutputIt  out,
int  num_digits,
unsigned  prefix,
const basic_format_specs< Char > &  specs,
write_digits 
) -> OutputIt

Definition at line 1373 of file format.h.

◆ write_int() [2/2]

template<typename Char , typename OutputIt , typename T >
FMT_CONSTEXPR FMT_INLINE auto write_int ( OutputIt  out,
write_int_arg< T arg,
const basic_format_specs< Char > &  specs,
locale_ref  loc 
) -> OutputIt

Definition at line 1474 of file format.h.

◆ write_int_localized()

template<typename OutputIt , typename UInt , typename Char >
auto write_int_localized ( OutputIt &  out,
UInt  value,
unsigned  prefix,
const basic_format_specs< Char > &  specs,
locale_ref  loc 
) -> bool

Definition at line 1397 of file format.h.

◆ write_nonfinite()

template<typename Char , typename OutputIt >
auto write_nonfinite ( OutputIt  out,
bool  isinf,
basic_format_specs< Char >  specs,
const float_specs fspecs 
) -> OutputIt

Definition at line 1585 of file format.h.

◆ write_padded() [1/2]

template<align::type align = align::left, typename OutputIt , typename Char , typename F >
constexpr auto write_padded ( OutputIt  out,
const basic_format_specs< Char > &  specs,
size_t  size,
F &&  f 
) -> OutputIt
constexpr

Definition at line 1298 of file format.h.

◆ write_padded() [2/2]

template<align::type align = align::left, typename OutputIt , typename Char , typename F >
FMT_CONSTEXPR auto write_padded ( OutputIt  out,
const basic_format_specs< Char > &  specs,
size_t  size,
size_t  width,
F &&  f 
) -> OutputIt

Definition at line 1279 of file format.h.

◆ write_ptr()

template<typename Char , typename OutputIt , typename UIntPtr >
auto write_ptr ( OutputIt  out,
UIntPtr  value,
const basic_format_specs< Char > *  specs 
) -> OutputIt

Definition at line 1315 of file format.h.

◆ write_significand() [1/5]

template<typename Char , typename UInt , FMT_ENABLE_IF(std::is_integral< UInt >::value) >
auto write_significand ( Char *  out,
UInt  significand,
int  significand_size,
int  integral_size,
Char  decimal_point 
) -> Char*
inline

Definition at line 1630 of file format.h.

◆ write_significand() [2/5]

template<typename Char , typename OutputIt >
auto write_significand ( OutputIt  out,
const char significand,
int significand_size 
) -> OutputIt
inline

Definition at line 1618 of file format.h.

◆ write_significand() [3/5]

template<typename OutputIt , typename Char >
auto write_significand ( OutputIt  out,
const char significand,
int  significand_size,
int  integral_size,
Char  decimal_point 
) -> OutputIt
inline

Definition at line 1658 of file format.h.

◆ write_significand() [4/5]

template<typename Char , typename OutputIt , typename UInt >
auto write_significand ( OutputIt  out,
UInt  significand,
int  significand_size 
) -> OutputIt
inline

Definition at line 1623 of file format.h.

◆ write_significand() [5/5]

template<typename OutputIt , typename UInt , typename Char , FMT_ENABLE_IF(!std::is_pointer< remove_cvref_t< OutputIt > >::value) >
auto write_significand ( OutputIt  out,
UInt  significand,
int  significand_size,
int  integral_size,
Char  decimal_point 
) -> OutputIt
inline

Definition at line 1647 of file format.h.