Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
core.h File Reference
#include <cstddef>
#include <cstdio>
#include <cstring>
#include <iterator>
#include <limits>
#include <memory>
#include <string>
#include <type_traits>
Include dependency graph for core.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  appender
 
struct  detail::arg_data< T, Char, NUM_ARGS, NUM_NAMED_ARGS >
 
struct  detail::arg_data< T, Char, NUM_ARGS, 0 >
 
struct  detail::arg_mapper< Context >
 
struct  detail::arg_ref< Char >
 
class  basic_format_arg< Context >
 
class  basic_format_arg< Context >
 
class  basic_format_args< Context >
 
class  basic_format_args< Context >
 
class  basic_format_context< OutputIt, Char >
 
class  basic_format_parse_context< Char >
 
class  basic_format_string< Char, Args >
 
class  basic_string_view< Char >
 
class  detail::buffer< T >
 
struct  detail::buffer_traits
 
struct  detail::char_t_impl< S, typename >
 
struct  detail::char_t_impl< S, enable_if_t< is_string< S >::value > >
 
class  detail::compile_parse_context< Char >
 
struct  detail::compile_string
 
class  detail::counting_buffer< T >
 
struct  detail::custom_value< Context >
 
class  dynamic_format_arg_store< Context >
 
struct  detail::dynamic_format_specs< Char >
 
struct  detail::dynamic_spec_id_handler< Char >
 
struct  detail::error_handler
 
struct  detail::fill_t< Char >
 
class  detail::fixed_buffer_traits
 
class  format_arg_store< Context, Args >
 
struct  detail::format_as_result< T >
 
struct  format_specs< Char >
 
class  detail::format_string_checker< Char, Args >
 
struct  format_to_n_result< OutputIt >
 
struct  detail::arg_mapper< Context >::formattable< T, U >
 
struct  formatter< T, Char, Enable >
 
struct  formatter< T, Char, enable_if_t< detail::type_constant< T, Char >::value !=detail::type::custom_type > >
 
class  basic_format_arg< Context >::handle
 
struct  detail::has_format_as< T >
 
struct  detail::is_back_insert_iterator< It >
 
struct  detail::is_back_insert_iterator< std::back_insert_iterator< Container > >
 
struct  is_char< T >
 
struct  is_char< char >
 
struct  detail::is_compile_string< S >
 
struct  is_contiguous< T >
 
struct  is_contiguous< std::basic_string< Char > >
 
struct  detail::is_named_arg< T >
 
struct  detail::is_named_arg< named_arg< Char, T > >
 
struct  detail::is_output_iterator< It, T, Enable >
 
struct  detail::is_output_iterator< It, T, void_t< typename std::iterator_traits< It >::iterator_category, decltype(*std::declval< It >()=std::declval< T >())> >
 
struct  detail::is_statically_named_arg< T >
 
struct  detail::is_string< S >
 
class  detail::iterator_buffer< OutputIt, T, Traits >
 
class  detail::iterator_buffer< std::back_insert_iterator< Container >, enable_if_t< is_contiguous< Container >::value, typename Container::value_type > >
 
class  detail::iterator_buffer< T *, T >
 
class  detail::iterator_buffer< T *, T, fixed_buffer_traits >
 
class  detail::locale_ref
 
struct  monostate
 
struct  detail::named_arg< Char, T >
 
struct  detail::named_arg_info< Char >
 
struct  detail::named_arg_value< Char >
 
struct  runtime_format_string< Char >
 
struct  detail::std_string_view< T >
 
struct  detail::string_value< Char >
 
struct  detail::strip_named_arg< T, bool >
 
struct  detail::strip_named_arg< T, true >
 
struct  detail::type_constant< T, Char >
 
struct  type_identity< T >
 
struct  detail::unformattable
 
struct  detail::unformattable_char
 
struct  detail::unformattable_pointer
 
union  detail::arg_ref< Char >::value
 
class  detail::value< Context >
 
struct  detail::vformat_args< Char >
 
struct  detail::vformat_args< char >
 
struct  detail::view
 

Namespaces

 align
 
 detail
 
 sign
 

Macros

#define FMT_API
 
#define FMT_ASSERT(condition, message)
 
#define FMT_BEGIN_EXPORT
 
#define FMT_BEGIN_NAMESPACE
 
#define FMT_CLANG_VERSION   0
 
#define FMT_CONSTEVAL
 
#define FMT_CONSTEXPR
 
#define FMT_CONSTEXPR20
 
#define FMT_CONSTEXPR_CHAR_TRAITS
 
#define FMT_CPLUSPLUS   __cplusplus
 
#define FMT_DECLTYPE_THIS
 
#define FMT_ENABLE_IF(...)   fmt::enable_if_t<(__VA_ARGS__), int> = 0
 
#define FMT_END_EXPORT
 
#define FMT_END_NAMESPACE
 
#define FMT_ENUM_UNDERLYING_TYPE(type)   : type
 
#define FMT_EXCEPTIONS   1
 
#define FMT_EXPORT
 
#define FMT_GCC_PRAGMA(arg)
 
#define FMT_GCC_VERSION   0
 
#define FMT_HAS_CPP14_ATTRIBUTE(attribute)   (FMT_CPLUSPLUS >= 201402L && FMT_HAS_CPP_ATTRIBUTE(attribute))
 
#define FMT_HAS_CPP17_ATTRIBUTE(attribute)   (FMT_CPLUSPLUS >= 201703L && FMT_HAS_CPP_ATTRIBUTE(attribute))
 
#define FMT_HAS_CPP_ATTRIBUTE(x)   0
 
#define FMT_HAS_FEATURE(x)   0
 
#define FMT_HAS_INCLUDE(x)   0
 
#define FMT_ICC_VERSION   0
 
#define FMT_INLINE   inline
 
#define FMT_MSC_VERSION   0
 
#define FMT_MSC_WARNING(...)
 
#define FMT_NODISCARD
 
#define FMT_NORETURN
 
#define FMT_TYPE_CONSTANT(Type, constant)
 
#define FMT_UNCHECKED_ITERATOR(It)   using unchecked_type = It
 
#define FMT_UNICODE   !FMT_MSC_VERSION
 
#define FMT_USE_CONSTEXPR   0
 
#define FMT_USE_INT128   0
 
#define FMT_USE_NONTYPE_TEMPLATE_ARGS   0
 
#define FMT_VERSION   100201
 
#define FMT_VISIBILITY(value)
 

Typedefs

using align_t = align::type
 
template<bool B>
using bool_constant = std::integral_constant< bool, B >
 
template<typename T >
using detail::buffer_appender = conditional_t< std::is_same< T, char >::value, appender, std::back_insert_iterator< buffer< T > >>
 
template<typename Char >
using buffer_context = basic_format_context< detail::buffer_appender< Char >, Char >
 
template<typename S >
using char_t = typename detail::char_t_impl< S >::type
 
template<bool B, typename T , typename F >
using conditional_t = typename std::conditional< B, T, F >::type
 
template<bool B, typename T = void>
using enable_if_t = typename std::enable_if< B, T >::type
 
using format_args = basic_format_args< format_context >
 
template<typename T >
using detail::format_as_t = typename format_as_result< T >::type
 
using format_context = buffer_context< char >
 
using format_parse_context = basic_format_parse_context< char >
 
template<typename... Args>
using format_string = basic_format_string< char, type_identity_t< Args >... >
 
template<typename T , typename Context >
using has_formatter = std::is_constructible< typename Context::template formatter_type< T > >
 
template<typename T , typename Char = char>
using is_formattable = bool_constant<!std::is_base_of< detail::unformattable, decltype(detail::arg_mapper< buffer_context< Char > >() .map(std::declval< T & >()))>::value >
 
using detail::long_type = conditional_t< long_short, int, long long >
 
template<typename T , typename Context >
using detail::mapped_type_constant = type_constant< decltype(arg_mapper< Context >().map(std::declval< const T & >())), typename Context::char_type >
 
template<typename T >
using remove_const_t = typename std::remove_const< T >::type
 
template<typename T >
using remove_cvref_t = typename std::remove_cv< remove_reference_t< T > >::type
 
template<typename T >
using remove_reference_t = typename std::remove_reference< T >::type
 
using sign_t = sign::type
 
using string_view = basic_string_view< char >
 
template<typename T >
using type_identity_t = typename type_identity< T >::type
 
using detail::ulong_type = conditional_t< long_short, unsigned, unsigned long long >
 
template<typename T >
using underlying_t = typename std::underlying_type< T >::type
 
template<typename... >
using detail::void_t = void
 

Enumerations

enum  {
  detail::sint_set, detail::uint_set, detail::bool_set = set(type::bool_type), detail::char_set = set(type::char_type),
  detail::float_set, detail::string_set = set(type::string_type), detail::cstring_set = set(type::cstring_type), detail::pointer_set = set(type::pointer_type)
}
 
enum  { detail::long_short = sizeof(long) == sizeof(int) }
 
enum  { detail::packed_arg_bits = 4 }
 
enum  { detail::max_packed_args = 62 / packed_arg_bits }
 
enum  : unsigned long long { detail::is_unpacked_bit = 1ULL << 63 }
 
enum  : unsigned long long { detail::has_named_args_bit = 1ULL << 62 }
 
enum  detail::arg_id_kind { detail::arg_id_kind::none, detail::arg_id_kind::index, detail::arg_id_kind::name }
 
enum  detail::int128_opt
 
enum  presentation_type : unsigned char {
  presentation_type::none, presentation_type::dec, presentation_type::oct, presentation_type::hex_lower,
  presentation_type::hex_upper, presentation_type::bin_lower, presentation_type::bin_upper, presentation_type::hexfloat_lower,
  presentation_type::hexfloat_upper, presentation_type::exp_lower, presentation_type::exp_upper, presentation_type::fixed_lower,
  presentation_type::fixed_upper, presentation_type::general_lower, presentation_type::general_upper, presentation_type::chr,
  presentation_type::string, presentation_type::pointer, presentation_type::debug
}
 
enum  detail::state {
  detail::state::start, detail::state::align, detail::state::sign, detail::state::hash,
  detail::state::zero, detail::state::width, detail::state::precision, detail::state::locale
}
 
enum  detail::type {
  detail::type::none_type, detail::type::int_type, detail::type::uint_type, detail::type::long_long_type,
  detail::type::ulong_long_type, detail::type::int128_type, detail::type::uint128_type, detail::type::bool_type,
  detail::type::char_type, detail::type::last_integer_type = char_type, detail::type::float_type, detail::type::double_type,
  detail::type::long_double_type, detail::type::last_numeric_type = long_double_type, detail::type::cstring_type, detail::type::string_type,
  detail::type::pointer_type, detail::type::custom_type
}
 
enum  detail::uint128_opt
 

Functions

template<typename Char , typename T >
auto arg (const Char *name, const T &arg) -> detail::named_arg< Char, T >
 
FMT_NORETURN FMT_API void detail::assert_fail (const char *file, int line, const char *message)
 
template<typename Char >
FMT_CONSTEXPR auto detail::check_char_specs (const format_specs< Char > &specs) -> bool
 
template<typename... , typename S , FMT_ENABLE_IF(!is_compile_string< S >::value) >
FMT_INLINE void detail::check_format_string (const S &)
 
template<typename... Args, typename S , FMT_ENABLE_IF(is_compile_string< S >::value) >
void detail::check_format_string (S format_str)
 
template<typename Char >
FMT_CONSTEXPR auto detail::code_point_length (const Char *begin) -> int
 
template<typename T >
constexpr FMT_INLINE auto detail::const_check (T value) -> T
 
template<typename T >
auto detail::convert_for_visit (T) -> monostate
 
template<typename Char , typename InputIt >
auto detail::copy_str (InputIt begin, InputIt end, appender out) -> appender
 
template<typename Char , typename InputIt , typename OutputIt >
FMT_CONSTEXPR auto detail::copy_str (InputIt begin, InputIt end, OutputIt out) -> OutputIt
 
template<typename Char , typename InputIt >
auto detail::copy_str (InputIt begin, InputIt end, std::back_insert_iterator< std::string > out) -> std::back_insert_iterator< std::string >
 
template<typename Char , typename R , typename OutputIt >
FMT_CONSTEXPR auto detail::copy_str (R &&rng, OutputIt out) -> OutputIt
 
template<typename Char , typename T , typename U , FMT_ENABLE_IF( std::is_same< remove_const_t< T >, U >::value &&is_char< U >::value) >
FMT_CONSTEXPR auto detail::copy_str (T *begin, T *end, U *out) -> U *
 
template<bool B = false>
constexpr auto detail::count () -> size_t
 
template<bool B1, bool B2, bool... Tail>
constexpr auto detail::count () -> size_t
 
template<typename... Args>
constexpr auto detail::count_named_args () -> size_t
 
template<typename... Args>
constexpr auto detail::count_statically_named_args () -> size_t
 
template<typename Char , typename Handler >
FMT_CONSTEXPR auto detail::do_parse_arg_id (const Char *begin, const Char *end, Handler &&handler) -> const Char *
 
template<typename >
constexpr auto detail::encode_types () -> unsigned long long
 
template<typename Context , typename Arg , typename... Args>
constexpr auto detail::encode_types () -> unsigned long long
 
template<bool IS_CONSTEXPR, typename T , typename Ptr = const T*>
FMT_CONSTEXPR auto detail::find (Ptr first, Ptr last, T value, Ptr &out) -> bool
 
template<>
auto detail::find< false, char > (const char *first, const char *last, char value, const char *&out) -> bool
 
enum type align::FMT_ENUM_UNDERLYING_TYPE (unsigned char)
 
enum type sign::FMT_ENUM_UNDERLYING_TYPE (unsigned char)
 
 detail::FMT_TYPE_CONSTANT (basic_string_view< Char >, string_type)
 
 detail::FMT_TYPE_CONSTANT (bool, bool_type)
 
 detail::FMT_TYPE_CONSTANT (Char, char_type)
 
 detail::FMT_TYPE_CONSTANT (const Char *, cstring_type)
 
 detail::FMT_TYPE_CONSTANT (const void *, pointer_type)
 
 detail::FMT_TYPE_CONSTANT (double, double_type)
 
 detail::FMT_TYPE_CONSTANT (float, float_type)
 
 detail::FMT_TYPE_CONSTANT (int, int_type)
 
 detail::FMT_TYPE_CONSTANT (int128_opt, int128_type)
 
 detail::FMT_TYPE_CONSTANT (long double, long_double_type)
 
 detail::FMT_TYPE_CONSTANT (long long, long_long_type)
 
 detail::FMT_TYPE_CONSTANT (uint128_opt, uint128_type)
 
 detail::FMT_TYPE_CONSTANT (unsigned long long, ulong_long_type)
 
 detail::FMT_TYPE_CONSTANT (unsigned, uint_type)
 
template<typename... T>
FMT_NODISCARD FMT_INLINE auto format (format_string< T... > fmt, T &&... args) -> std::string
 
template<typename OutputIt , typename... T, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, char >::value) >
FMT_INLINE auto format_to (OutputIt out, format_string< T... > fmt, T &&... args) -> OutputIt
 
template<typename OutputIt , typename... T, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, char >::value) >
FMT_INLINE auto format_to_n (OutputIt out, size_t n, format_string< T... > fmt, T &&... args) -> format_to_n_result< OutputIt >
 
template<typename... T>
FMT_NODISCARD FMT_INLINE auto formatted_size (format_string< T... > fmt, T &&... args) -> size_t
 
template<typename... Args, typename Char >
FMT_CONSTEXPR auto detail::get_arg_index_by_name (basic_string_view< Char > name) -> int
 
template<typename T , typename OutputIt >
auto detail::get_buffer (OutputIt out) -> iterator_buffer< OutputIt, T >
 
template<typename T , typename Buf , FMT_ENABLE_IF(std::is_base_of< buffer< char >, Buf >::value) >
auto detail::get_buffer (std::back_insert_iterator< Buf > out) -> buffer< char > &
 
template<typename Container >
auto detail::get_container (std::back_insert_iterator< Container > it) -> Container &
 
template<typename Buf , typename OutputIt >
FMT_INLINE auto detail::get_iterator (Buf &buf, OutputIt) -> decltype(buf.out())
 
template<typename T , typename OutputIt >
auto detail::get_iterator (buffer< T > &, OutputIt out) -> OutputIt
 
template<typename T , typename Context >
constexpr auto detail::has_const_formatter () -> bool
 
template<typename Context >
constexpr auto detail::has_const_formatter_impl (...) -> bool
 
template<typename Context , typename T >
constexpr auto detail::has_const_formatter_impl (T *) -> decltype(typename Context::template formatter_type< T >().format(std::declval< const T & >(), std::declval< Context & >()), true)
 
template<typename... T>
FMT_CONSTEXPR void detail::ignore_unused (const T &...)
 
constexpr auto detail::in (type t, int set) -> bool
 
template<typename Char >
void detail::init_named_args (named_arg_info< Char > *, int, int)
 
template<typename Char , typename T , typename... Tail, FMT_ENABLE_IF(!is_named_arg< T >::value) >
void detail::init_named_args (named_arg_info< Char > *named_args, int arg_count, int named_arg_count, const T &, const Tail &... args)
 
template<typename... Args>
FMT_CONSTEXPR FMT_INLINE void detail::init_named_args (std::nullptr_t, int, int, const Args &...)
 
constexpr auto detail::is_arithmetic_type (type t) -> bool
 
constexpr FMT_INLINE auto detail::is_constant_evaluated (bool default_value=false) noexcept -> bool
 
constexpr auto detail::is_integral_type (type t) -> bool
 
template<typename Char >
constexpr auto detail::is_name_start (Char c) -> bool
 
FMT_CONSTEXPR auto detail::is_utf8 () -> bool
 
template<typename Context , typename T >
FMT_CONSTEXPR auto detail::make_arg (T &val) -> basic_format_arg< Context >
 
template<bool PACKED, typename Context , typename T , FMT_ENABLE_IF(!PACKED) >
FMT_CONSTEXPR auto detail::make_arg (T &val) -> basic_format_arg< Context >
 
template<bool PACKED, typename Context , typename T , FMT_ENABLE_IF(PACKED) >
FMT_CONSTEXPR FMT_INLINE auto detail::make_arg (T &val) -> value< Context >
 
template<typename Context = format_context, typename... T>
constexpr auto make_format_args (T &... args) -> format_arg_store< Context, remove_cvref_t< T >... >
 
FMT_CONSTEXPR auto detail::parse_align (char c) -> align_t
 
template<typename Char , typename Handler >
FMT_CONSTEXPR FMT_INLINE auto detail::parse_arg_id (const Char *begin, const Char *end, Handler &&handler) -> const Char *
 
template<typename Char >
FMT_CONSTEXPR auto detail::parse_dynamic_spec (const Char *begin, const Char *end, int &value, arg_ref< Char > &ref, basic_format_parse_context< Char > &ctx) -> const Char *
 
template<typename Char >
FMT_CONSTEXPR FMT_INLINE auto detail::parse_format_specs (const Char *begin, const Char *end, dynamic_format_specs< Char > &specs, basic_format_parse_context< Char > &ctx, type arg_type) -> const Char *
 
template<typename T , typename ParseContext >
FMT_CONSTEXPR auto detail::parse_format_specs (ParseContext &ctx) -> decltype(ctx.begin())
 
template<bool IS_CONSTEXPR, typename Char , typename Handler >
FMT_CONSTEXPR FMT_INLINE void detail::parse_format_string (basic_string_view< Char > format_str, Handler &&handler)
 
template<typename Char >
FMT_CONSTEXPR auto detail::parse_nonnegative_int (const Char *&begin, const Char *end, int error_value) noexcept -> int
 
template<typename Char >
FMT_CONSTEXPR auto detail::parse_precision (const Char *begin, const Char *end, int &value, arg_ref< Char > &ref, basic_format_parse_context< Char > &ctx) -> const Char *
 
template<typename Char , typename Handler >
FMT_CONSTEXPR auto detail::parse_replacement_field (const Char *begin, const Char *end, Handler &&handler) -> const Char *
 
template<typename... T>
FMT_INLINE void print (format_string< T... > fmt, T &&... args)
 
template<typename... T>
FMT_INLINE void print (std::FILE *f, format_string< T... > fmt, T &&... args)
 
template<typename... T>
FMT_INLINE void println (format_string< T... > fmt, T &&... args)
 
template<typename... T>
FMT_INLINE void println (std::FILE *f, format_string< T... > fmt, T &&... args)
 
auto runtime (string_view s) -> runtime_format_string<>
 
constexpr auto detail::set (type rhs) -> int
 
FMT_NORETURN FMT_API void detail::throw_format_error (const char *message)
 
template<typename Char , FMT_ENABLE_IF(std::is_integral< Char >::value) >
constexpr auto detail::to_ascii (Char c) -> char
 
void detail::to_string_view (...)
 
template<typename Char >
constexpr auto detail::to_string_view (basic_string_view< Char > s) -> basic_string_view< Char >
 
template<typename Char , FMT_ENABLE_IF(is_char< Char >::value) >
FMT_INLINE auto detail::to_string_view (const Char *s) -> basic_string_view< Char >
 
template<typename S , FMT_ENABLE_IF(is_compile_string< S >::value) >
constexpr auto detail::to_string_view (const S &s) -> basic_string_view< typename S::char_type >
 
template<typename Char , typename Traits , typename Alloc >
auto detail::to_string_view (const std::basic_string< Char, Traits, Alloc > &s) -> basic_string_view< Char >
 
template<typename Char , FMT_ENABLE_IF(!std::is_empty< std_string_view< Char >>::value) >
auto detail::to_string_view (std_string_view< Char > s) -> basic_string_view< Char >
 
template<typename Int >
FMT_CONSTEXPR auto detail::to_unsigned (Int value) -> typename std::make_unsigned< Int >::type
 
FMT_API auto vformat (string_view fmt, format_args args) -> std::string
 
template<typename Char >
void detail::vformat_to (buffer< Char > &buf, basic_string_view< Char > fmt, typename vformat_args< Char >::type args, locale_ref loc={})
 
template<typename OutputIt , FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, char >::value) >
auto vformat_to (OutputIt out, string_view fmt, format_args args) -> OutputIt
 
template<typename OutputIt , typename... T, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, char >::value) >
auto vformat_to_n (OutputIt out, size_t n, string_view fmt, format_args args) -> format_to_n_result< OutputIt >
 
template<typename Visitor , typename Context >
FMT_CONSTEXPR FMT_INLINE auto visit_format_arg (Visitor &&vis, const basic_format_arg< Context > &arg) -> decltype(vis(0))
 
FMT_API void vprint (std::FILE *f, string_view fmt, format_args args)
 
FMT_API void vprint (string_view fmt, format_args args)
 
FMT_API void detail::vprint_mojibake (std::FILE *, string_view, format_args)
 

Macro Definition Documentation

◆ FMT_API

#define FMT_API

Definition at line 207 of file core.h.

◆ FMT_ASSERT

#define FMT_ASSERT (   condition,
  message 
)
Value:
((condition) /* void() fails with -Winvalid-constexpr on clang 4.0.1 */ \
? (void)0 \
: fmt::detail::assert_fail(__FILE__, __LINE__, (message)))

Definition at line 353 of file core.h.

◆ FMT_BEGIN_EXPORT

#define FMT_BEGIN_EXPORT

Definition at line 187 of file core.h.

◆ FMT_BEGIN_NAMESPACE

#define FMT_BEGIN_NAMESPACE
Value:
namespace fmt { \
inline namespace v10 {

Definition at line 177 of file core.h.

◆ FMT_CLANG_VERSION

#define FMT_CLANG_VERSION   0

Definition at line 26 of file core.h.

◆ FMT_CONSTEVAL

#define FMT_CONSTEVAL

Definition at line 236 of file core.h.

◆ FMT_CONSTEXPR

#define FMT_CONSTEXPR

Definition at line 105 of file core.h.

◆ FMT_CONSTEXPR20

#define FMT_CONSTEXPR20

Definition at line 116 of file core.h.

◆ FMT_CONSTEXPR_CHAR_TRAITS

#define FMT_CONSTEXPR_CHAR_TRAITS

Definition at line 132 of file core.h.

◆ FMT_CPLUSPLUS

#define FMT_CPLUSPLUS   __cplusplus

Definition at line 64 of file core.h.

◆ FMT_DECLTYPE_THIS

#define FMT_DECLTYPE_THIS

Definition at line 256 of file core.h.

◆ FMT_ENABLE_IF

#define FMT_ENABLE_IF (   ...)    fmt::enable_if_t<(__VA_ARGS__), int> = 0

Definition at line 303 of file core.h.

◆ FMT_END_EXPORT

#define FMT_END_EXPORT

Definition at line 188 of file core.h.

◆ FMT_END_NAMESPACE

#define FMT_END_NAMESPACE
Value:
} \
}

Definition at line 180 of file core.h.

◆ FMT_ENUM_UNDERLYING_TYPE

#define FMT_ENUM_UNDERLYING_TYPE (   type)    : type

Definition at line 2014 of file core.h.

◆ FMT_EXCEPTIONS

#define FMT_EXCEPTIONS   1

Definition at line 141 of file core.h.

◆ FMT_EXPORT

#define FMT_EXPORT

Definition at line 186 of file core.h.

◆ FMT_GCC_PRAGMA

#define FMT_GCC_PRAGMA (   arg)

Definition at line 41 of file core.h.

◆ FMT_GCC_VERSION

#define FMT_GCC_VERSION   0

Definition at line 33 of file core.h.

◆ FMT_HAS_CPP14_ATTRIBUTE

#define FMT_HAS_CPP14_ATTRIBUTE (   attribute)    (FMT_CPLUSPLUS >= 201402L && FMT_HAS_CPP_ATTRIBUTE(attribute))

Definition at line 85 of file core.h.

◆ FMT_HAS_CPP17_ATTRIBUTE

#define FMT_HAS_CPP17_ATTRIBUTE (   attribute)    (FMT_CPLUSPLUS >= 201703L && FMT_HAS_CPP_ATTRIBUTE(attribute))

Definition at line 88 of file core.h.

◆ FMT_HAS_CPP_ATTRIBUTE

#define FMT_HAS_CPP_ATTRIBUTE (   x)    0

Definition at line 82 of file core.h.

◆ FMT_HAS_FEATURE

#define FMT_HAS_FEATURE (   x)    0

Definition at line 70 of file core.h.

◆ FMT_HAS_INCLUDE

#define FMT_HAS_INCLUDE (   x)    0

Definition at line 76 of file core.h.

◆ FMT_ICC_VERSION

#define FMT_ICC_VERSION   0

Definition at line 50 of file core.h.

◆ FMT_INLINE

#define FMT_INLINE   inline

Definition at line 165 of file core.h.

◆ FMT_MSC_VERSION

#define FMT_MSC_VERSION   0

Definition at line 57 of file core.h.

◆ FMT_MSC_WARNING

#define FMT_MSC_WARNING (   ...)

Definition at line 58 of file core.h.

◆ FMT_NODISCARD

#define FMT_NODISCARD

Definition at line 157 of file core.h.

◆ FMT_NORETURN

#define FMT_NORETURN

Definition at line 150 of file core.h.

◆ FMT_TYPE_CONSTANT

#define FMT_TYPE_CONSTANT (   Type,
  constant 
)
Value:
template <typename Char> \
struct type_constant<Type, Char> \
: std::integral_constant<type, type::constant> {}

Definition at line 600 of file core.h.

◆ FMT_UNCHECKED_ITERATOR

#define FMT_UNCHECKED_ITERATOR (   It)    using unchecked_type = It

Definition at line 173 of file core.h.

◆ FMT_UNICODE

#define FMT_UNICODE   !FMT_MSC_VERSION

Definition at line 221 of file core.h.

◆ FMT_USE_CONSTEXPR

#define FMT_USE_CONSTEXPR   0

Definition at line 99 of file core.h.

◆ FMT_USE_INT128

#define FMT_USE_INT128   0

Definition at line 380 of file core.h.

◆ FMT_USE_NONTYPE_TEMPLATE_ARGS

#define FMT_USE_NONTYPE_TEMPLATE_ARGS   0

Definition at line 247 of file core.h.

◆ FMT_VERSION

#define FMT_VERSION   100201

Definition at line 21 of file core.h.

◆ FMT_VISIBILITY

#define FMT_VISIBILITY (   value)

Definition at line 194 of file core.h.

Typedef Documentation

◆ align_t

using align_t = align::type

Definition at line 2020 of file core.h.

◆ bool_constant

template<bool B>
using bool_constant = std::integral_constant<bool, B>

Definition at line 274 of file core.h.

◆ buffer_context

template<typename Char >
using buffer_context = basic_format_context<detail::buffer_appender<Char>, Char>

Definition at line 1792 of file core.h.

◆ char_t

template<typename S >
using char_t = typename detail::char_t_impl<S>::type

String's character type.

Definition at line 664 of file core.h.

◆ conditional_t

template<bool B, typename T , typename F >
using conditional_t = typename std::conditional<B, T, F>::type

Definition at line 273 of file core.h.

◆ enable_if_t

template<bool B, typename T = void>
using enable_if_t = typename std::enable_if<B, T>::type

Definition at line 271 of file core.h.

◆ format_args

An alias to basic_format_args<format_context>.

Definition at line 2005 of file core.h.

◆ format_context

Definition at line 1793 of file core.h.

◆ format_parse_context

Definition at line 740 of file core.h.

◆ format_string

template<typename... Args>
using format_string = basic_format_string<char, type_identity_t<Args>...>

Definition at line 2805 of file core.h.

◆ has_formatter

template<typename T , typename Context >
using has_formatter = std::is_constructible<typename Context::template formatter_type<T> >

Definition at line 1096 of file core.h.

◆ is_formattable

template<typename T , typename Char = char>
using is_formattable = bool_constant<!std::is_base_of< detail::unformattable, decltype(detail::arg_mapper<buffer_context<Char> >() .map(std::declval<T&>()))>::value>

Definition at line 1798 of file core.h.

◆ remove_const_t

template<typename T >
using remove_const_t = typename std::remove_const<T>::type

Definition at line 278 of file core.h.

◆ remove_cvref_t

template<typename T >
using remove_cvref_t = typename std::remove_cv<remove_reference_t<T> >::type

Definition at line 280 of file core.h.

◆ remove_reference_t

template<typename T >
using remove_reference_t = typename std::remove_reference<T>::type

Definition at line 276 of file core.h.

◆ sign_t

using sign_t = sign::type

Definition at line 2024 of file core.h.

◆ string_view

Definition at line 518 of file core.h.

◆ type_identity_t

template<typename T >
using type_identity_t = typename type_identity<T>::type

Definition at line 284 of file core.h.

◆ underlying_t

template<typename T >
using underlying_t = typename std::underlying_type<T>::type

Definition at line 286 of file core.h.

Enumeration Type Documentation

◆ presentation_type

enum presentation_type : unsigned char
strong
Enumerator
none 
dec 
oct 
hex_lower 
hex_upper 
bin_lower 
bin_upper 
hexfloat_lower 
hexfloat_upper 
exp_lower 
exp_upper 
fixed_lower 
fixed_upper 
general_lower 
general_upper 
chr 
string 
pointer 
debug 

Definition at line 2053 of file core.h.

Function Documentation

◆ arg()

template<typename Char , typename T >
auto arg ( const Char *  name,
const T &  arg 
) -> detail::named_arg<Char, T>
inline

\rst Returns a named argument to be used in a formatting function. It should only be used in a call to a formatting function or dynamic_format_arg_store::push_back.

Example**::

fmt::print("Elapsed time: {s:.2f} seconds", fmt::arg("s", 1.23)); \endrst

Definition at line 1875 of file core.h.

◆ format()

template<typename... T>
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.

Example**::

#include <fmt/core.h> std::string message = fmt::format("The answer is {}.", 42); \endrst

Definition at line 2833 of file core.h.

◆ format_to()

template<typename OutputIt , typename... T, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, char >::value) >
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 and returns the iterator past the end of the output range. format_to does not append a terminating null character.

Example**::

auto out = std::vector<char>(); fmt::format_to(std::back_inserter(out), "{}", 42); \endrst

Definition at line 2861 of file core.h.

◆ format_to_n()

template<typename OutputIt , typename... T, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, char >::value) >
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 output iterator out and returns the total (not truncated) output size and the iterator past the end of the output range. format_to_n does not append a terminating null character. \endrst

Definition at line 2893 of file core.h.

◆ formatted_size()

template<typename... T>
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 at line 2900 of file core.h.

◆ make_format_args()

template<typename Context = format_context, typename... T>
constexpr auto make_format_args ( T &...  args) -> format_arg_store<Context, remove_cvref_t<T>...>
constexpr

\rst Constructs a ~fmtformat_arg_store object that contains references to arguments and can be implicitly converted to ~fmtformat_args. Context can be omitted in which case it defaults to ~fmtformat_context. See ~fmtarg for lifetime considerations. \endrst

Definition at line 1858 of file core.h.

◆ print() [1/2]

template<typename... T>
FMT_INLINE void print ( format_string< T... >  fmt,
T &&...  args 
)

\rst Formats args according to specifications in fmt and writes the output to stdout.

Example**::

fmt::print("Elapsed time: {0:.2f} seconds", 1.23); \endrst

Definition at line 2921 of file core.h.

◆ print() [2/2]

template<typename... T>
FMT_INLINE void print ( std::FILE *  f,
format_string< T... >  fmt,
T &&...  args 
)

\rst Formats args according to specifications in fmt and writes the output to the file f.

Example**::

fmt::print(stderr, "Don't {}!", "panic"); \endrst

Definition at line 2938 of file core.h.

◆ println() [1/2]

template<typename... T>
FMT_INLINE void println ( format_string< T... >  fmt,
T &&...  args 
)

Formats args according to specifications in fmt and writes the output to stdout followed by a newline.

Definition at line 2958 of file core.h.

◆ println() [2/2]

template<typename... T>
FMT_INLINE void println ( std::FILE *  f,
format_string< T... >  fmt,
T &&...  args 
)

Formats args according to specifications in fmt and writes the output to the file f followed by a newline.

Definition at line 2949 of file core.h.

◆ runtime()

auto runtime ( string_view  s) -> runtime_format_string<>
inline

\rst Creates a runtime format string.

Example**::

Check format string at runtime instead of compile-time. fmt::print(fmt::runtime("{:d}"), "I am not a number"); \endrst

Definition at line 2816 of file core.h.

◆ vformat()

FMT_API auto vformat ( string_view  fmt,
format_args  args 
) -> std::string

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

◆ vformat_to()

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

Formats a string and writes the output to out.

Definition at line 2841 of file core.h.

◆ vformat_to_n()

template<typename OutputIt , typename... T, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, char >::value) >
auto vformat_to_n ( OutputIt  out,
size_t  n,
string_view  fmt,
format_args  args 
) -> format_to_n_result<OutputIt>

Definition at line 2875 of file core.h.

◆ visit_format_arg()

template<typename Visitor , typename Context >
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. For example, if the argument type is double then vis(value) will be called with the value of type double. \endrst

Definition at line 1698 of file core.h.

◆ vprint() [1/2]

FMT_API void vprint ( std::FILE *  f,
string_view  fmt,
format_args  args 
)

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

◆ vprint() [2/2]

FMT_API void vprint ( string_view  fmt,
format_args  args 
)

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

detail::assert_fail
FMT_NORETURN FMT_API void assert_fail(const char *file, int line, const char *message)
Definition: format-inl.h:30


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:27