WPILibC++ 2023.4.3
core.h File Reference
#include <cstddef>
#include <cstdio>
#include <cstring>
#include <iterator>
#include <limits>
#include <string>
#include <type_traits>

Go to the source code of this file.

Classes

struct  type_identity< T >
 
struct  disjunction<... >
 
struct  disjunction< P >
 
struct  disjunction< P1, Pn... >
 
struct  conjunction<... >
 
struct  conjunction< P >
 
struct  conjunction< P1, Pn... >
 
struct  monostate
 
struct  std_string_view< T >
 
class  basic_string_view< Char >
 An implementation of std::basic_string_view for pre-C++17. More...
 
struct  is_char< T >
 Specifies if T is a character type. More...
 
struct  is_char< char >
 
struct  compile_string
 
struct  is_compile_string< S >
 
struct  is_string< S >
 
struct  char_t_impl< S, typename >
 
struct  char_t_impl< S, enable_if_t< is_string< S >::value > >
 
struct  type_constant< T, Char >
 
struct  error_handler
 
class  basic_format_parse_context< Char, ErrorHandler >
 \rst Parsing context consisting of a format string range being parsed and an argument counter for automatic indexing. More...
 
class  compile_parse_context< Char, ErrorHandler >
 
struct  formatter< T, Char, Enable >
 
struct  is_contiguous< T >
 
struct  is_contiguous< std::basic_string< Char > >
 
class  buffer< T >
 \rst A contiguous memory buffer with an optional growing ability. More...
 
struct  buffer_traits
 
class  fixed_buffer_traits
 
class  iterator_buffer< OutputIt, T, Traits >
 
class  iterator_buffer< T *, T, fixed_buffer_traits >
 
class  iterator_buffer< T *, T >
 
class  iterator_buffer< std::back_insert_iterator< Container >, enable_if_t< is_contiguous< Container >::value, typename Container::value_type > >
 
class  counting_buffer< T >
 
struct  fallback_formatter< T, Char, Enable >
 
struct  view
 
struct  named_arg< Char, T >
 
struct  named_arg_info< Char >
 
struct  arg_data< T, Char, NUM_ARGS, NUM_NAMED_ARGS >
 
struct  arg_data< T, Char, NUM_ARGS, 0 >
 
struct  is_named_arg< T >
 
struct  is_statically_named_arg< T >
 
struct  is_named_arg< named_arg< Char, T > >
 
struct  unformattable
 
struct  unformattable_char
 
struct  unformattable_const
 
struct  unformattable_pointer
 
struct  string_value< Char >
 
struct  named_arg_value< Char >
 
struct  custom_value< Context >
 
class  value< Context >
 
struct  has_format_as< T >
 
struct  arg_mapper< Context >
 
struct  arg_mapper< Context >::formattable< T, U >
 
class  appender
 
class  basic_format_arg< Context >
 
class  basic_format_arg< Context >::handle
 
struct  is_output_iterator< It, T, Enable >
 
struct  is_output_iterator< It, T, void_t< typename std::iterator_traits< It >::iterator_category, decltype(*std::declval< It >()=std::declval< T >())> >
 
struct  is_back_insert_iterator< OutputIt >
 
struct  is_back_insert_iterator< std::back_insert_iterator< Container > >
 
struct  is_contiguous_back_insert_iterator< OutputIt >
 
struct  is_contiguous_back_insert_iterator< std::back_insert_iterator< Container > >
 
struct  is_contiguous_back_insert_iterator< appender >
 
class  locale_ref
 
class  basic_format_context< OutputIt, Char >
 
class  format_arg_store< Context, Args >
 \rst An array of references to arguments. More...
 
class  basic_format_args< Context >
 \rst A view of a collection of formatting arguments. More...
 
struct  fill_t< Char >
 
struct  basic_format_specs< Char >
 
struct  arg_ref< Char >
 
union  arg_ref< Char >::value
 
struct  dynamic_format_specs< Char >
 
struct  auto_id
 
class  specs_setter< Char >
 
class  dynamic_specs_handler< ParseContext >
 
struct  strip_named_arg< T, bool >
 
struct  strip_named_arg< T, true >
 
struct  float_specs
 
class  specs_checker< Handler >
 
class  format_string_checker< Char, ErrorHandler, Args >
 
struct  formatter< T, Char, enable_if_t< detail::type_constant< T, Char >::value !=detail::type::custom_type > >
 
struct  basic_runtime< Char >
 
class  basic_format_string< Char, Args >
 A compile-time format string. More...
 
struct  format_to_n_result< OutputIt >
 

Namespaces

namespace  align
 
namespace  sign
 

Macros

#define FMT_VERSION   90100
 
#define FMT_CLANG_VERSION   0
 
#define FMT_GCC_VERSION   0
 
#define FMT_GCC_PRAGMA(arg)
 
#define FMT_ICC_VERSION   0
 
#define FMT_MSC_VERSION   0
 
#define FMT_MSC_WARNING(...)
 
#define FMT_CPLUSPLUS   __cplusplus
 
#define FMT_HAS_FEATURE(x)   0
 
#define FMT_HAS_INCLUDE(x)   0
 
#define FMT_HAS_CPP_ATTRIBUTE(x)   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_USE_CONSTEXPR   0
 
#define FMT_CONSTEXPR
 
#define FMT_CONSTEXPR20
 
#define FMT_CONSTEXPR_CHAR_TRAITS
 
#define FMT_EXCEPTIONS   1
 
#define FMT_DEPRECATED   /* deprecated */
 
#define FMT_NORETURN
 
#define FMT_FALLTHROUGH
 
#define FMT_NODISCARD
 
#define FMT_USE_FLOAT   1
 
#define FMT_USE_DOUBLE   1
 
#define FMT_USE_LONG_DOUBLE   1
 
#define FMT_INLINE   inline
 
#define FMT_FORWARD(...)   static_cast<decltype(__VA_ARGS__)&&>(__VA_ARGS__)
 
#define FMT_UNCHECKED_ITERATOR(It)   using unchecked_type = It
 
#define FMT_BEGIN_NAMESPACE
 
#define FMT_END_NAMESPACE
 
#define FMT_MODULE_EXPORT
 
#define FMT_MODULE_EXPORT_BEGIN
 
#define FMT_MODULE_EXPORT_END
 
#define FMT_BEGIN_DETAIL_NAMESPACE   namespace detail {
 
#define FMT_END_DETAIL_NAMESPACE   }
 
#define FMT_CLASS_API
 
#define FMT_API
 
#define FMT_UNICODE   !FMT_MSC_VERSION
 
#define FMT_CONSTEVAL
 
#define FMT_USE_NONTYPE_TEMPLATE_ARGS   0
 
#define FMT_ENABLE_IF(...)   enable_if_t<(__VA_ARGS__), int> = 0
 
#define FMT_ASSERT(condition, message)
 
#define FMT_USE_INT128   0
 
#define FMT_TYPE_CONSTANT(Type, constant)
 
#define FMT_BUFFER_CONTEXT(Char)    basic_format_context<detail::buffer_appender<Char>, Char>
 
#define FMT_ENUM_UNDERLYING_TYPE(type)   : type
 
#define FMT_FORMAT_AS(Type, Base)
 

Typedefs

template<bool B, typename T = void>
using enable_if_t = typename std::enable_if< B, T >::type
 
template<bool B, typename T , typename F >
using conditional_t = typename std::conditional< B, T, F >::type
 
template<bool B>
using bool_constant = std::integral_constant< bool, B >
 
template<typename T >
using remove_reference_t = typename std::remove_reference< T >::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 type_identity_t = typename type_identity< T >::type
 
template<typename T >
using underlying_t = typename std::underlying_type< T >::type
 
using string_view = basic_string_view< char >
 
template<typename S >
using char_t = typename detail::char_t_impl< S >::type
 String's character type. More...
 
using format_parse_context = basic_format_parse_context< char >
 
template<typename T , typename Context >
using has_formatter = std::is_constructible< typename Context::template formatter_type< T > >
 
template<typename T >
using buffer_appender = conditional_t< std::is_same< T, char >::value, appender, std::back_insert_iterator< buffer< T > > >
 
template<typename T , typename Char >
using has_fallback_formatter = std::false_type
 
using long_type = conditional_t< long_short, int, long long >
 
using ulong_type = conditional_t< long_short, unsigned, unsigned long long >
 
template<typename T , typename Context >
using mapped_type_constant = type_constant< decltype(arg_mapper< Context >().map(std::declval< const T & >())), typename Context::char_type >
 
template<typename... >
using void_t = void
 
template<typename Char >
using buffer_context = basic_format_context< detail::buffer_appender< Char >, Char >
 
using format_context = buffer_context< char >
 
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 &&!detail::has_fallback_formatter< T, Char >::value >
 
using format_args = basic_format_args< format_context >
 An alias to basic_format_args<format_context>. More...
 
using align_t = align::type
 
using sign_t = sign::type
 
using format_specs = basic_format_specs< char >
 
template<typename... Args>
using format_string = basic_format_string< char, type_identity_t< Args >... >
 

Enumerations

enum class  int128_opt
 
enum class  uint128_opt
 
enum class  type {
  none_type , int_type , uint_type , long_long_type ,
  ulong_long_type , int128_type , uint128_type , bool_type ,
  char_type , last_integer_type = char_type , float_type , double_type ,
  long_double_type , last_numeric_type = long_double_type , cstring_type , string_type ,
  pointer_type , custom_type
}
 
enum  { long_short = sizeof(long) == sizeof(int) }
 
enum  { packed_arg_bits = 4 }
 
enum  { max_packed_args = 62 / packed_arg_bits }
 
enum  : unsigned long long { is_unpacked_bit = 1ULL << 63 }
 
enum  : unsigned long long { has_named_args_bit = 1ULL << 62 }
 
enum class  presentation_type : unsigned char {
  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
}
 
enum class  arg_id_kind { none , index , name }
 
enum class  float_format : unsigned char { general , exp , fixed , hex }
 

Functions

template<typename... T>
FMT_BEGIN_DETAIL_NAMESPACE FMT_CONSTEXPR void ignore_unused (const T &...)
 
constexpr FMT_INLINE auto is_constant_evaluated (bool default_value=false) noexcept -> bool
 
template<typename T >
constexpr FMT_INLINE auto const_check (T value) -> T
 
FMT_NORETURN FMT_API void assert_fail (const char *file, int line, const char *message)
 
template<typename T >
auto convert_for_visit (T) -> monostate
 
template<typename Int >
FMT_CONSTEXPR auto to_unsigned (Int value) -> typename std::make_unsigned< Int >::type
 
 FMT_MSC_WARNING (suppress :4566) const expr unsigned char micro[]
 
constexpr auto is_utf8 () -> bool
 
template<typename Char , FMT_ENABLE_IF(is_char< Char >::value) >
FMT_INLINE auto to_string_view (const Char *s) -> basic_string_view< Char >
 
template<typename Char , typename Traits , typename Alloc >
auto to_string_view (const std::basic_string< Char, Traits, Alloc > &s) -> basic_string_view< Char >
 
template<typename Char >
constexpr auto to_string_view (basic_string_view< Char > s) -> basic_string_view< Char >
 
template<typename Char , FMT_ENABLE_IF(!std::is_empty< std_string_view< Char > >::value) >
auto to_string_view (std_string_view< Char > s) -> basic_string_view< Char >
 
template<typename S , FMT_ENABLE_IF(is_compile_string< S >::value) >
constexpr auto to_string_view (const S &s) -> basic_string_view< typename S::char_type >
 
void to_string_view (...)
 
 FMT_TYPE_CONSTANT (int, int_type)
 
 FMT_TYPE_CONSTANT (unsigned, uint_type)
 
 FMT_TYPE_CONSTANT (long long, long_long_type)
 
 FMT_TYPE_CONSTANT (unsigned long long, ulong_long_type)
 
 FMT_TYPE_CONSTANT (int128_opt, int128_type)
 
 FMT_TYPE_CONSTANT (uint128_opt, uint128_type)
 
 FMT_TYPE_CONSTANT (bool, bool_type)
 
 FMT_TYPE_CONSTANT (Char, char_type)
 
 FMT_TYPE_CONSTANT (float, float_type)
 
 FMT_TYPE_CONSTANT (double, double_type)
 
 FMT_TYPE_CONSTANT (long double, long_double_type)
 
 FMT_TYPE_CONSTANT (const Char *, cstring_type)
 
 FMT_TYPE_CONSTANT (basic_string_view< Char >, string_type)
 
 FMT_TYPE_CONSTANT (const void *, pointer_type)
 
constexpr bool is_integral_type (type t)
 
constexpr bool is_arithmetic_type (type t)
 
FMT_NORETURN FMT_API void throw_format_error (const char *message)
 
template<typename Context , typename T >
FMT_BEGIN_DETAIL_NAMESPACE constexpr auto has_const_formatter_impl (T *) -> decltype(typename Context::template formatter_type< T >().format(std::declval< const T & >(), std::declval< Context & >()), true)
 
template<typename Context >
constexpr auto has_const_formatter_impl (...) -> bool
 
template<typename T , typename Context >
constexpr auto has_const_formatter () -> bool
 
template<typename Container >
auto get_container (std::back_insert_iterator< Container > it) -> Container &
 
template<typename Char , typename InputIt , typename OutputIt >
FMT_CONSTEXPR auto copy_str (InputIt begin, InputIt end, 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 copy_str (T *begin, T *end, U *out) -> U *
 
template<typename T , typename OutputIt >
auto get_buffer (OutputIt out) -> iterator_buffer< OutputIt, T >
 
template<typename Buffer >
auto get_iterator (Buffer &buf) -> decltype(buf.out())
 
template<typename T >
auto get_iterator (buffer< T > &buf) -> buffer_appender< T >
 
template<typename Char >
void 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 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 init_named_args (std::nullptr_t, int, int, const Args &...)
 
template<bool B = false>
constexpr auto count () -> size_t
 
template<bool B1, bool B2, bool... Tail>
constexpr auto count () -> size_t
 
template<typename... Args>
constexpr auto count_named_args () -> size_t
 
template<typename... Args>
constexpr auto count_statically_named_args () -> size_t
 
template<typename Context , typename T >
FMT_CONSTEXPR auto make_arg (T &&value) -> basic_format_arg< Context >
 
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. More...
 
template<typename Char , typename InputIt >
FMT_BEGIN_DETAIL_NAMESPACE auto copy_str (InputIt begin, InputIt end, appender out) -> appender
 
template<typename Char , typename R , typename OutputIt >
FMT_CONSTEXPR auto copy_str (R &&rng, OutputIt out) -> OutputIt
 
template<typename >
constexpr auto encode_types () -> unsigned long long
 
template<typename Context , typename Arg , typename... Args>
constexpr auto encode_types () -> unsigned long long
 
template<typename Context , typename T >
FMT_CONSTEXPR FMT_INLINE auto make_value (T &&val) -> value< Context >
 
template<bool IS_PACKED, typename Context , type , typename T , FMT_ENABLE_IF(IS_PACKED) >
FMT_CONSTEXPR FMT_INLINE auto make_arg (T &&val) -> value< Context >
 
template<bool IS_PACKED, typename Context , type , typename T , FMT_ENABLE_IF(!IS_PACKED) >
FMT_CONSTEXPR auto make_arg (T &&value) -> basic_format_arg< Context >
 
template<typename Context = format_context, typename... Args>
constexpr auto make_format_args (Args &&... args) -> format_arg_store< Context, remove_cvref_t< Args >... >
 \rst Constructs a ~fmtformat_arg_store object that contains references to arguments and can be implicitly converted to ~fmtformat_args. More...
 
template<typename Char , typename T >
auto arg (const Char *name, const T &arg) -> detail::named_arg< Char, T >
 \rst Returns a named argument to be used in a formatting function. More...
 
enum type align::FMT_ENUM_UNDERLYING_TYPE (unsigned char)
 
enum type sign::FMT_ENUM_UNDERLYING_TYPE (unsigned char)
 
template<typename Char >
constexpr bool is_ascii_letter (Char c)
 
template<typename Char , FMT_ENABLE_IF(std::is_integral< Char >::value) >
constexpr auto to_ascii (Char c) -> Char
 
FMT_CONSTEXPR auto code_point_length_impl (char c) -> int
 
template<typename Char >
FMT_CONSTEXPR auto code_point_length (const Char *begin) -> int
 
template<bool IS_CONSTEXPR, typename T , typename Ptr = const T*>
FMT_CONSTEXPR auto find (Ptr first, Ptr last, T value, Ptr &out) -> bool
 
template<>
auto find< false, char > (const char *first, const char *last, char value, const char *&out) -> bool
 
template<typename Char >
FMT_CONSTEXPR auto parse_nonnegative_int (const Char *&begin, const Char *end, int error_value) noexcept -> int
 
template<typename Char , typename Handler >
FMT_CONSTEXPR auto parse_align (const Char *begin, const Char *end, Handler &&handler) -> const Char *
 
template<typename Char >
FMT_CONSTEXPR bool is_name_start (Char c)
 
template<typename Char , typename IDHandler >
FMT_CONSTEXPR auto do_parse_arg_id (const Char *begin, const Char *end, IDHandler &&handler) -> const Char *
 
template<typename Char , typename IDHandler >
FMT_CONSTEXPR FMT_INLINE auto parse_arg_id (const Char *begin, const Char *end, IDHandler &&handler) -> const Char *
 
template<typename Char , typename Handler >
FMT_CONSTEXPR auto parse_width (const Char *begin, const Char *end, Handler &&handler) -> const Char *
 
template<typename Char , typename Handler >
FMT_CONSTEXPR auto parse_precision (const Char *begin, const Char *end, Handler &&handler) -> const Char *
 
template<typename Char >
FMT_CONSTEXPR auto parse_presentation_type (Char type) -> presentation_type
 
template<typename Char , typename SpecHandler >
FMT_CONSTEXPR FMT_INLINE auto parse_format_specs (const Char *begin, const Char *end, SpecHandler &&handler) -> const Char *
 
template<typename Char , typename Handler >
FMT_CONSTEXPR auto parse_replacement_field (const Char *begin, const Char *end, Handler &&handler) -> const Char *
 
template<bool IS_CONSTEXPR, typename Char , typename Handler >
FMT_CONSTEXPR FMT_INLINE void parse_format_string (basic_string_view< Char > format_str, Handler &&handler)
 
template<typename T , typename ParseContext >
FMT_CONSTEXPR auto parse_format_specs (ParseContext &ctx) -> decltype(ctx.begin())
 
template<typename ErrorHandler >
FMT_CONSTEXPR void check_int_type_spec (presentation_type type, ErrorHandler &&eh)
 
template<typename Char , typename ErrorHandler = error_handler>
FMT_CONSTEXPR auto check_char_specs (const basic_format_specs< Char > &specs, ErrorHandler &&eh={}) -> bool
 
template<typename ErrorHandler = error_handler, typename Char >
FMT_CONSTEXPR auto parse_float_type_spec (const basic_format_specs< Char > &specs, ErrorHandler &&eh={}) -> float_specs
 
template<typename ErrorHandler = error_handler>
FMT_CONSTEXPR auto check_cstring_type_spec (presentation_type type, ErrorHandler &&eh={}) -> bool
 
template<typename ErrorHandler = error_handler>
FMT_CONSTEXPR void check_string_type_spec (presentation_type type, ErrorHandler &&eh={})
 
template<typename ErrorHandler >
FMT_CONSTEXPR void check_pointer_type_spec (presentation_type type, ErrorHandler &&eh)
 
template<typename... Args, typename Char >
FMT_CONSTEXPR auto get_arg_index_by_name (basic_string_view< Char > name) -> int
 
template<typename... , typename S , FMT_ENABLE_IF(!is_compile_string< S >::value) >
FMT_INLINE void check_format_string (const S &)
 
template<typename... Args, typename S , FMT_ENABLE_IF(is_compile_string< S >::value) >
void check_format_string (S format_str)
 
template<typename Char >
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={})
 
FMT_API void vprint_mojibake (std::FILE *, string_view, format_args)
 
 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 >)
 
auto runtime (string_view s) -> basic_runtime< char >
 \rst Creates a runtime format string. More...
 
FMT_API auto vformat (string_view fmt, format_args args) -> std::string
 
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. More...
 
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. More...
 
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. More...
 
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 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. More...
 
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...). More...
 
FMT_API void vprint (string_view fmt, format_args args)
 
FMT_API void vprint (std::FILE *f, string_view fmt, format_args args)
 
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. More...
 
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. More...
 

Variables

constexpr int invalid_arg_index = -1
 

Macro Definition Documentation

◆ FMT_API

#define FMT_API

◆ 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)))
FMT_NORETURN FMT_API void assert_fail(const char *file, int line, const char *message)

◆ FMT_BEGIN_DETAIL_NAMESPACE

#define FMT_BEGIN_DETAIL_NAMESPACE   namespace detail {

◆ FMT_BEGIN_NAMESPACE

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

◆ FMT_BUFFER_CONTEXT

#define FMT_BUFFER_CONTEXT (   Char)     basic_format_context<detail::buffer_appender<Char>, Char>

◆ FMT_CLANG_VERSION

#define FMT_CLANG_VERSION   0

◆ FMT_CLASS_API

#define FMT_CLASS_API

◆ FMT_CONSTEVAL

#define FMT_CONSTEVAL

◆ FMT_CONSTEXPR

#define FMT_CONSTEXPR

◆ FMT_CONSTEXPR20

#define FMT_CONSTEXPR20

◆ FMT_CONSTEXPR_CHAR_TRAITS

#define FMT_CONSTEXPR_CHAR_TRAITS

◆ FMT_CPLUSPLUS

#define FMT_CPLUSPLUS   __cplusplus

◆ FMT_DEPRECATED

#define FMT_DEPRECATED   /* deprecated */

◆ FMT_ENABLE_IF

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

◆ FMT_END_DETAIL_NAMESPACE

#define FMT_END_DETAIL_NAMESPACE   }

◆ FMT_END_NAMESPACE

#define FMT_END_NAMESPACE
Value:
} \
}

◆ FMT_ENUM_UNDERLYING_TYPE

#define FMT_ENUM_UNDERLYING_TYPE (   type)    : type

◆ FMT_EXCEPTIONS

#define FMT_EXCEPTIONS   1

◆ FMT_FALLTHROUGH

#define FMT_FALLTHROUGH

◆ FMT_FORMAT_AS

#define FMT_FORMAT_AS (   Type,
  Base 
)
Value:
template <typename 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_NODISCARD FMT_INLINE auto format(format_string< T... > fmt, T &&... args) -> std::string
\rst Formats args according to specifications in fmt and returns the result as a string.
Definition: core.h:3204
Type
Definition: Constants.h:471
Definition: core.h:791

◆ FMT_FORWARD

#define FMT_FORWARD (   ...)    static_cast<decltype(__VA_ARGS__)&&>(__VA_ARGS__)

◆ FMT_GCC_PRAGMA

#define FMT_GCC_PRAGMA (   arg)

◆ FMT_GCC_VERSION

#define FMT_GCC_VERSION   0

◆ FMT_HAS_CPP14_ATTRIBUTE

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

◆ FMT_HAS_CPP17_ATTRIBUTE

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

◆ FMT_HAS_CPP_ATTRIBUTE

#define FMT_HAS_CPP_ATTRIBUTE (   x)    0

◆ FMT_HAS_FEATURE

#define FMT_HAS_FEATURE (   x)    0

◆ FMT_HAS_INCLUDE

#define FMT_HAS_INCLUDE (   x)    0

◆ FMT_ICC_VERSION

#define FMT_ICC_VERSION   0

◆ FMT_INLINE

#define FMT_INLINE   inline

◆ FMT_MODULE_EXPORT

#define FMT_MODULE_EXPORT

◆ FMT_MODULE_EXPORT_BEGIN

#define FMT_MODULE_EXPORT_BEGIN

◆ FMT_MODULE_EXPORT_END

#define FMT_MODULE_EXPORT_END

◆ FMT_MSC_VERSION

#define FMT_MSC_VERSION   0

◆ FMT_MSC_WARNING

#define FMT_MSC_WARNING (   ...)

◆ FMT_NODISCARD

#define FMT_NODISCARD

◆ FMT_NORETURN

#define FMT_NORETURN

◆ FMT_TYPE_CONSTANT

#define FMT_TYPE_CONSTANT (   Type,
  constant 
)
Value:
template <typename Char> \
: std::integral_constant<type, type::constant> {}
Definition: core.h:600

◆ FMT_UNCHECKED_ITERATOR

#define FMT_UNCHECKED_ITERATOR (   It)    using unchecked_type = It

◆ FMT_UNICODE

#define FMT_UNICODE   !FMT_MSC_VERSION

◆ FMT_USE_CONSTEXPR

#define FMT_USE_CONSTEXPR   0

◆ FMT_USE_DOUBLE

#define FMT_USE_DOUBLE   1

◆ FMT_USE_FLOAT

#define FMT_USE_FLOAT   1

◆ FMT_USE_INT128

#define FMT_USE_INT128   0

◆ FMT_USE_LONG_DOUBLE

#define FMT_USE_LONG_DOUBLE   1

◆ FMT_USE_NONTYPE_TEMPLATE_ARGS

#define FMT_USE_NONTYPE_TEMPLATE_ARGS   0

◆ FMT_VERSION

#define FMT_VERSION   90100

Typedef Documentation

◆ align_t

◆ bool_constant

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

◆ buffer_appender

template<typename T >
using buffer_appender = conditional_t<std::is_same<T, char>::value, appender, std::back_insert_iterator<buffer<T> >>

◆ buffer_context

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

◆ char_t

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

String's character type.

◆ conditional_t

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

◆ enable_if_t

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

◆ format_args

An alias to basic_format_args<format_context>.

◆ format_context

◆ format_parse_context

◆ format_specs

◆ format_string

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

◆ has_fallback_formatter

template<typename T , typename Char >
using has_fallback_formatter = std::false_type

◆ has_formatter

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

◆ 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 && !detail::has_fallback_formatter<T, Char>::value>

◆ long_type

using long_type = conditional_t<long_short, int, long long>

◆ mapped_type_constant

template<typename T , typename Context >
using mapped_type_constant = type_constant<decltype(arg_mapper<Context>().map(std::declval<const T&>())), typename Context::char_type>

◆ remove_const_t

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

◆ remove_cvref_t

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

◆ remove_reference_t

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

◆ sign_t

using sign_t = sign::type

◆ string_view

◆ type_identity_t

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

◆ ulong_type

using ulong_type = conditional_t<long_short, unsigned, unsigned long long>

◆ underlying_t

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

◆ void_t

template<typename... >
using void_t = void

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
long_short 

◆ anonymous enum

anonymous enum
Enumerator
packed_arg_bits 

◆ anonymous enum

anonymous enum
Enumerator
max_packed_args 

◆ anonymous enum

anonymous enum : unsigned long long
Enumerator
is_unpacked_bit 

◆ anonymous enum

anonymous enum : unsigned long long
Enumerator
has_named_args_bit 

◆ arg_id_kind

enum class arg_id_kind
strong
Enumerator
none 
index 
name 

◆ float_format

enum class float_format : unsigned char
strong
Enumerator
general 
exp 
fixed 
hex 

◆ int128_opt

enum class int128_opt
strong

◆ presentation_type

enum class 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 

◆ type

enum class type
strong
Enumerator
none_type 
int_type 
uint_type 
long_long_type 
ulong_long_type 
int128_type 
uint128_type 
bool_type 
char_type 
last_integer_type 
float_type 
double_type 
long_double_type 
last_numeric_type 
cstring_type 
string_type 
pointer_type 
custom_type 

◆ uint128_opt

enum class uint128_opt
strong

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

◆ assert_fail()

FMT_NORETURN FMT_API void assert_fail ( const char *  file,
int  line,
const char *  message 
)

◆ check_char_specs()

template<typename Char , typename ErrorHandler = error_handler>
FMT_CONSTEXPR auto check_char_specs ( const basic_format_specs< Char > &  specs,
ErrorHandler &&  eh = {} 
) -> bool

◆ check_cstring_type_spec()

template<typename ErrorHandler = error_handler>
FMT_CONSTEXPR auto check_cstring_type_spec ( presentation_type  type,
ErrorHandler &&  eh = {} 
) -> bool

◆ check_format_string() [1/2]

template<typename... , typename S , FMT_ENABLE_IF(!is_compile_string< S >::value) >
FMT_INLINE void check_format_string ( const S )

◆ check_format_string() [2/2]

template<typename... Args, typename S , FMT_ENABLE_IF(is_compile_string< S >::value) >
void check_format_string ( S  format_str)

◆ check_int_type_spec()

template<typename ErrorHandler >
FMT_CONSTEXPR void check_int_type_spec ( presentation_type  type,
ErrorHandler &&  eh 
)

◆ check_pointer_type_spec()

template<typename ErrorHandler >
FMT_CONSTEXPR void check_pointer_type_spec ( presentation_type  type,
ErrorHandler &&  eh 
)

◆ check_string_type_spec()

template<typename ErrorHandler = error_handler>
FMT_CONSTEXPR void check_string_type_spec ( presentation_type  type,
ErrorHandler &&  eh = {} 
)

◆ code_point_length()

template<typename Char >
FMT_CONSTEXPR auto code_point_length ( const Char *  begin) -> int

◆ code_point_length_impl()

FMT_CONSTEXPR auto code_point_length_impl ( char  c) -> int
inline

◆ const_check()

template<typename T >
constexpr FMT_INLINE auto const_check ( value) -> T
constexpr

◆ convert_for_visit()

template<typename T >
auto convert_for_visit ( ) -> monostate

◆ copy_str() [1/4]

template<typename Char , typename InputIt >
FMT_BEGIN_DETAIL_NAMESPACE auto copy_str ( InputIt  begin,
InputIt  end,
appender  out 
) -> appender

◆ copy_str() [2/4]

template<typename Char , typename InputIt , typename OutputIt >
FMT_CONSTEXPR auto copy_str ( InputIt  begin,
InputIt  end,
OutputIt  out 
) -> OutputIt

◆ copy_str() [3/4]

template<typename Char , typename R , typename OutputIt >
FMT_CONSTEXPR auto copy_str ( R &&  rng,
OutputIt  out 
) -> OutputIt

◆ copy_str() [4/4]

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 copy_str ( T *  begin,
T *  end,
U *  out 
) -> U*

◆ count() [1/2]

template<bool B = false>
constexpr auto count ( ) -> size_t
constexpr

◆ count() [2/2]

template<bool B1, bool B2, bool... Tail>
constexpr auto count ( ) -> size_t
constexpr

◆ count_named_args()

template<typename... Args>
constexpr auto count_named_args ( ) -> size_t
constexpr

◆ count_statically_named_args()

template<typename... Args>
constexpr auto count_statically_named_args ( ) -> size_t
constexpr

◆ do_parse_arg_id()

template<typename Char , typename IDHandler >
FMT_CONSTEXPR auto do_parse_arg_id ( const Char *  begin,
const Char *  end,
IDHandler &&  handler 
) -> const Char*

◆ encode_types() [1/2]

template<typename >
constexpr auto encode_types ( ) -> unsigned long long
constexpr

◆ encode_types() [2/2]

template<typename Context , typename Arg , typename... Args>
constexpr auto encode_types ( ) -> unsigned long long
constexpr

◆ find()

template<bool IS_CONSTEXPR, typename T , typename Ptr = const T*>
FMT_CONSTEXPR auto find ( Ptr  first,
Ptr  last,
value,
Ptr &  out 
) -> bool

◆ find< false, char >()

template<>
auto find< false, char > ( const char *  first,
const char *  last,
char  value,
const char *&  out 
) -> bool
inline

◆ 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   
)

◆ FMT_MSC_WARNING()

FMT_MSC_WARNING ( suppress :4566  ) const

◆ FMT_TYPE_CONSTANT() [1/14]

FMT_TYPE_CONSTANT ( basic_string_view< Char >  ,
string_type   
)

◆ FMT_TYPE_CONSTANT() [2/14]

FMT_TYPE_CONSTANT ( bool  ,
bool_type   
)

◆ FMT_TYPE_CONSTANT() [3/14]

FMT_TYPE_CONSTANT ( Char  ,
char_type   
)

◆ FMT_TYPE_CONSTANT() [4/14]

FMT_TYPE_CONSTANT ( const Char *  ,
cstring_type   
)

◆ FMT_TYPE_CONSTANT() [5/14]

FMT_TYPE_CONSTANT ( const void *  ,
pointer_type   
)

◆ FMT_TYPE_CONSTANT() [6/14]

FMT_TYPE_CONSTANT ( double  ,
double_type   
)

◆ FMT_TYPE_CONSTANT() [7/14]

FMT_TYPE_CONSTANT ( float  ,
float_type   
)

◆ FMT_TYPE_CONSTANT() [8/14]

FMT_TYPE_CONSTANT ( int  ,
int_type   
)

◆ FMT_TYPE_CONSTANT() [9/14]

FMT_TYPE_CONSTANT ( int128_opt  ,
int128_type   
)

◆ FMT_TYPE_CONSTANT() [10/14]

FMT_TYPE_CONSTANT ( long double  ,
long_double_type   
)

◆ FMT_TYPE_CONSTANT() [11/14]

FMT_TYPE_CONSTANT ( long long  ,
long_long_type   
)

◆ FMT_TYPE_CONSTANT() [12/14]

FMT_TYPE_CONSTANT ( uint128_opt  ,
uint128_type   
)

◆ FMT_TYPE_CONSTANT() [13/14]

FMT_TYPE_CONSTANT ( unsigned long long  ,
ulong_long_type   
)

◆ FMT_TYPE_CONSTANT() [14/14]

FMT_TYPE_CONSTANT ( unsigned  ,
uint_type   
)

◆ 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

◆ 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

◆ 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

◆ 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...).

◆ get_arg_index_by_name()

template<typename... Args, typename Char >
FMT_CONSTEXPR auto get_arg_index_by_name ( basic_string_view< Char >  name) -> int

◆ get_buffer()

template<typename T , typename OutputIt >
auto get_buffer ( OutputIt  out) -> iterator_buffer<OutputIt, T>

◆ get_container()

template<typename Container >
auto get_container ( std::back_insert_iterator< Container >  it) -> Container&
inline

◆ get_iterator() [1/2]

template<typename Buffer >
auto get_iterator ( Buffer &  buf) -> decltype(buf.out())

◆ get_iterator() [2/2]

template<typename T >
auto get_iterator ( buffer< T > &  buf) -> buffer_appender<T>

◆ has_const_formatter()

template<typename T , typename Context >
constexpr auto has_const_formatter ( ) -> bool
constexpr

◆ has_const_formatter_impl() [1/2]

template<typename Context >
constexpr auto has_const_formatter_impl (   ...) -> bool
constexpr

◆ has_const_formatter_impl() [2/2]

template<typename Context , typename T >
FMT_BEGIN_DETAIL_NAMESPACE constexpr auto has_const_formatter_impl ( T *  ) -> decltype(typename Context::template formatter_type<T>().format( std::declval<const T&>(), std::declval<Context&>()), true)
constexpr

◆ ignore_unused()

template<typename... T>
FMT_BEGIN_DETAIL_NAMESPACE FMT_CONSTEXPR void ignore_unused ( const T &  ...)

◆ init_named_args() [1/3]

template<typename Char >
void init_named_args ( named_arg_info< Char > *  ,
int  ,
int   
)
inline

◆ init_named_args() [2/3]

template<typename Char , typename T , typename... Tail, FMT_ENABLE_IF(!is_named_arg< T >::value) >
void init_named_args ( named_arg_info< Char > *  named_args,
int  arg_count,
int  named_arg_count,
const T &  arg,
const Tail &...  args 
)

◆ init_named_args() [3/3]

template<typename... Args>
FMT_CONSTEXPR FMT_INLINE void init_named_args ( std::nullptr_t  ,
int  ,
int  ,
const Args &  ... 
)

◆ is_arithmetic_type()

constexpr bool is_arithmetic_type ( type  t)
constexpr

◆ is_ascii_letter()

template<typename Char >
constexpr bool is_ascii_letter ( Char  c)
constexpr

◆ is_constant_evaluated()

constexpr FMT_INLINE auto is_constant_evaluated ( bool  default_value = false) -> bool
constexprnoexcept

◆ is_integral_type()

constexpr bool is_integral_type ( type  t)
constexpr

◆ is_name_start()

template<typename Char >
FMT_CONSTEXPR bool is_name_start ( Char  c)

◆ is_utf8()

constexpr auto is_utf8 ( ) -> bool
constexpr

◆ make_arg() [1/3]

template<bool IS_PACKED, typename Context , type , typename T , FMT_ENABLE_IF(IS_PACKED) >
FMT_CONSTEXPR FMT_INLINE auto make_arg ( T &&  val) -> value<Context>

◆ make_arg() [2/3]

template<typename Context , typename T >
FMT_CONSTEXPR auto make_arg ( T &&  value) -> basic_format_arg<Context>

◆ make_arg() [3/3]

template<bool IS_PACKED, typename Context , type , typename T , FMT_ENABLE_IF(!IS_PACKED) >
FMT_CONSTEXPR auto make_arg ( T &&  value) -> basic_format_arg<Context>
inline

◆ make_format_args()

template<typename Context = format_context, typename... Args>
constexpr auto make_format_args ( Args &&...  args) -> format_arg_store<Context, remove_cvref_t<Args>...>
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 ~fmt::context. See ~fmtarg for lifetime considerations. \endrst

◆ make_value()

template<typename Context , typename T >
FMT_CONSTEXPR FMT_INLINE auto make_value ( T &&  val) -> value<Context>

◆ parse_align()

template<typename Char , typename Handler >
FMT_CONSTEXPR auto parse_align ( const Char *  begin,
const Char *  end,
Handler &&  handler 
) -> const Char*

◆ parse_arg_id()

template<typename Char , typename IDHandler >
FMT_CONSTEXPR FMT_INLINE auto parse_arg_id ( const Char *  begin,
const Char *  end,
IDHandler &&  handler 
) -> const Char*

◆ parse_float_type_spec()

template<typename ErrorHandler = error_handler, typename Char >
FMT_CONSTEXPR auto parse_float_type_spec ( const basic_format_specs< Char > &  specs,
ErrorHandler &&  eh = {} 
) -> float_specs

◆ parse_format_specs() [1/2]

template<typename Char , typename SpecHandler >
FMT_CONSTEXPR FMT_INLINE auto parse_format_specs ( const Char *  begin,
const Char *  end,
SpecHandler &&  handler 
) -> const Char*

◆ parse_format_specs() [2/2]

template<typename T , typename ParseContext >
FMT_CONSTEXPR auto parse_format_specs ( ParseContext &  ctx) -> decltype(ctx.begin())

◆ parse_format_string()

template<bool IS_CONSTEXPR, typename Char , typename Handler >
FMT_CONSTEXPR FMT_INLINE void parse_format_string ( basic_string_view< Char >  format_str,
Handler &&  handler 
)

◆ parse_nonnegative_int()

template<typename Char >
FMT_CONSTEXPR auto parse_nonnegative_int ( const Char *&  begin,
const Char *  end,
int  error_value 
) -> int
noexcept

◆ parse_precision()

template<typename Char , typename Handler >
FMT_CONSTEXPR auto parse_precision ( const Char *  begin,
const Char *  end,
Handler &&  handler 
) -> const Char*

◆ parse_presentation_type()

template<typename Char >
FMT_CONSTEXPR auto parse_presentation_type ( Char  type) -> presentation_type

◆ parse_replacement_field()

template<typename Char , typename Handler >
FMT_CONSTEXPR auto parse_replacement_field ( const Char *  begin,
const Char *  end,
Handler &&  handler 
) -> const Char*

◆ parse_width()

template<typename Char , typename Handler >
FMT_CONSTEXPR auto parse_width ( const Char *  begin,
const Char *  end,
Handler &&  handler 
) -> const Char*

◆ 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

◆ 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

◆ runtime()

auto runtime ( string_view  s) -> basic_runtime<char>
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

◆ throw_format_error()

FMT_NORETURN FMT_API void throw_format_error ( const char *  message)

◆ to_ascii()

template<typename Char , FMT_ENABLE_IF(std::is_integral< Char >::value) >
constexpr auto to_ascii ( Char  c) -> Char
constexpr

◆ to_string_view() [1/6]

void to_string_view (   ...)

◆ to_string_view() [2/6]

template<typename Char >
constexpr auto to_string_view ( basic_string_view< Char >  s) -> basic_string_view<Char>
constexpr

◆ to_string_view() [3/6]

template<typename Char , FMT_ENABLE_IF(is_char< Char >::value) >
FMT_INLINE auto to_string_view ( const Char *  s) -> basic_string_view<Char>

◆ to_string_view() [4/6]

template<typename S , FMT_ENABLE_IF(is_compile_string< S >::value) >
constexpr auto to_string_view ( const S s) -> basic_string_view<typename S::char_type>
constexpr

◆ to_string_view() [5/6]

template<typename Char , typename Traits , typename Alloc >
auto to_string_view ( const std::basic_string< Char, Traits, Alloc > &  s) -> basic_string_view<Char>
inline

◆ to_string_view() [6/6]

template<typename Char , FMT_ENABLE_IF(!std::is_empty< std_string_view< Char > >::value) >
auto to_string_view ( std_string_view< Char >  s) -> basic_string_view<Char>
inline

◆ to_unsigned()

template<typename Int >
FMT_CONSTEXPR auto to_unsigned ( Int  value) -> typename std::make_unsigned<Int>::type

◆ vformat()

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

◆ vformat_to() [1/2]

template<typename Char >
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 = {} 
)

◆ vformat_to() [2/2]

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.

◆ 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>

◆ 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

◆ vprint() [1/2]

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

◆ vprint() [2/2]

FMT_API void vprint ( string_view  fmt,
format_args  args 
)

◆ vprint_mojibake()

void vprint_mojibake ( std::FILE *  ,
string_view  ,
format_args   
)
inline

Variable Documentation

◆ invalid_arg_index

constexpr int invalid_arg_index = -1
constexpr