WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
base.h File Reference
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <type_traits>

Go to the source code of this file.

Classes

struct  monostate
 
struct  detail::bitint< N >
 
struct  detail::ubitint< N >
 
struct  detail::is_std_string_like< T, Enable >
 
struct  detail::is_std_string_like< T, void_t< decltype(std::declval< T >().find_first_of(typename T::value_type(), 0))> >
 
struct  detail::is_back_insert_iterator< It, Enable >
 
struct  detail::is_back_insert_iterator< It, bool_constant< std::is_same< decltype(adl::invoke_back_inserter< typename It::container_type >()), It >::value > >
 
class  basic_string_view< Char >
 An implementation of std::basic_string_view for pre-C++17. More...
 
struct  is_xchar< T >
 Specifies if T is an extended character type. Can be specialized by users. More...
 
struct  is_xchar< wchar_t >
 
struct  is_xchar< char16_t >
 
struct  is_xchar< char32_t >
 
struct  is_char< T >
 
struct  is_char< char >
 
struct  is_contiguous< T >
 
struct  formatter< T, Char, Enable >
 
class  basic_specs
 
struct  format_specs
 
class  parse_context< Char >
 Parsing context consisting of a format string range being parsed and an argument counter for automatic indexing. More...
 
struct  detail::has_to_string_view< T, Enable >
 
struct  detail::has_to_string_view< T, void_t< decltype(detail::to_string_view(std::declval< T >()))> >
 
struct  detail::type_constant< T, Char >
 
struct  detail::view
 
struct  detail::is_named_arg< T >
 
struct  detail::is_static_named_arg< T >
 
struct  detail::is_named_arg< named_arg< Char, T > >
 
struct  detail::named_arg< Char, T >
 
struct  detail::named_arg_info< Char >
 
struct  detail::use_format_as< T, Enable >
 
struct  detail::use_format_as_member< T, Enable >
 
struct  detail::use_format_as< T, bool_constant< std::is_arithmetic< format_as_result< T > >::value > >
 
struct  detail::use_format_as_member< T, bool_constant< std::is_arithmetic< format_as_member_result< T > >::value > >
 
struct  detail::type_mapper< Char >
 
class  detail::compile_parse_context< Char >
 
union  detail::arg_ref< Char >
 
struct  detail::dynamic_format_specs< Char >
 
struct  detail::dynamic_spec_handler< Char >
 
struct  detail::parse_dynamic_spec_result< Char >
 
struct  detail::compile_string
 
struct  detail::arg_pack< T >
 
class  detail::format_string_checker< Char, NUM_ARGS, NUM_NAMED_ARGS, DYNAMIC_NAMES >
 
class  detail::buffer< T >
 A contiguous memory buffer with an optional growing ability. More...
 
struct  detail::buffer_traits
 
class  detail::fixed_buffer_traits
 
class  detail::iterator_buffer< OutputIt, T, Traits >
 
class  detail::iterator_buffer< T *, T, fixed_buffer_traits >
 
class  detail::iterator_buffer< T *, T >
 
class  detail::container_buffer< Container >
 
class  detail::iterator_buffer< OutputIt, enable_if_t< is_back_insert_iterator< OutputIt >::value &&is_contiguous< typename OutputIt::container_type >::value, typename OutputIt::container_type::value_type > >
 
class  detail::counting_buffer< T >
 
struct  detail::is_back_insert_iterator< basic_appender< T > >
 
struct  detail::has_back_insert_iterator_container_append< OutputIt, InputIt, typename >
 
struct  detail::has_back_insert_iterator_container_append< OutputIt, InputIt, void_t< decltype(get_container(std::declval< OutputIt >()) .append(std::declval< InputIt >(), std::declval< InputIt >()))> >
 
struct  detail::is_buffer_appender< It, Enable >
 
struct  detail::is_buffer_appender< It, bool_constant< is_back_insert_iterator< It >::value &&std::is_base_of< buffer< typename It::container_type::value_type >, typename It::container_type >::value > >
 
struct  detail::string_value< Char >
 
struct  detail::custom_value< Context >
 
struct  detail::named_arg_value< Char >
 
struct  detail::custom_tag
 
class  detail::value< Context >
 
struct  detail::is_output_iterator< It, T, Enable >
 
struct  detail::is_output_iterator< appender, char >
 
struct  detail::is_output_iterator< It, T, void_t< decltype(*std::declval< decay_t< It > & >()++=std::declval< T >())> >
 
struct  detail::locale_ref
 
struct  detail::named_arg_store< Context, NUM_ARGS, NUM_NAMED_ARGS, DESC >
 
struct  detail::format_arg_store< Context, NUM_ARGS, NUM_NAMED_ARGS, DESC >
 
struct  detail::native_formatter< T, Char, TYPE >
 
struct  detail::locking< T, Enable >
 
struct  detail::locking< T, void_t< typename formatter< remove_cvref_t< T > >::nonlocking > >
 
class  basic_appender< T >
 
class  basic_format_arg< Context >
 
class  basic_format_arg< Context >::handle
 
class  basic_format_args< Context >
 A view of a collection of formatting arguments. More...
 
class  context
 
struct  runtime_format_string< Char >
 
struct  fstring< T >
 A compile-time format string. More...
 
struct  formatter< T, Char, enable_if_t< detail::type_constant< T, Char >::value !=detail::type::custom_type > >
 
struct  format_to_n_result< OutputIt >
 
struct  format_to_result
 

Namespaces

namespace  detail
 detail namespace with internal helper functions
 
namespace  detail::adl
 

Macros

#define FMT_VERSION   110100
 
#define FMT_CLANG_VERSION   0
 
#define FMT_GCC_VERSION   0
 
#define FMT_ICC_VERSION   0
 
#define FMT_MSC_VERSION   0
 
#define FMT_GLIBCXX_RELEASE   0
 
#define FMT_LIBCPP_VERSION   0
 
#define FMT_CPLUSPLUS   __cplusplus
 
#define FMT_HAS_FEATURE(x)
 
#define FMT_HAS_INCLUDE(x)
 
#define FMT_HAS_BUILTIN(x)
 
#define FMT_HAS_CPP_ATTRIBUTE(x)
 
#define FMT_HAS_CPP14_ATTRIBUTE(attribute)
 
#define FMT_HAS_CPP17_ATTRIBUTE(attribute)
 
#define FMT_USE_CONSTEXPR   0
 
#define FMT_CONSTEXPR
 
#define FMT_USE_CONSTEVAL   0
 
#define FMT_CONSTEVAL
 
#define FMT_CONSTEXPR20
 
#define FMT_USE_EXCEPTIONS   1
 
#define FMT_TRY   if (true)
 
#define FMT_CATCH(x)
 
#define FMT_FALLTHROUGH
 
#define FMT_NORETURN
 
#define FMT_NODISCARD
 
#define FMT_DEPRECATED   /* deprecated */
 
#define FMT_ALWAYS_INLINE   inline
 
#define FMT_INLINE   inline
 
#define FMT_VISIBILITY(value)
 
#define FMT_PRAGMA_IMPL(x)
 
#define FMT_PRAGMA_GCC(x)
 
#define FMT_PRAGMA_CLANG(x)
 
#define FMT_MSC_WARNING(...)
 
#define FMT_BEGIN_NAMESPACE
 
#define FMT_END_NAMESPACE
 
#define FMT_EXPORT
 
#define FMT_BEGIN_EXPORT
 
#define FMT_END_EXPORT
 
#define FMT_WIN32   0
 
#define FMT_API
 
#define FMT_OPTIMIZE_SIZE   0
 
#define FMT_BUILTIN_TYPES   1
 
#define FMT_APPLY_VARIADIC(expr)
 
#define FMT_ENABLE_IF(...)
 
#define FMT_ASSERT(condition, message)
 
#define FMT_USE_INT128   0
 
#define FMT_USE_BITINT   (FMT_CLANG_VERSION >= 1500)
 
#define FMT_UNICODE   1
 
#define FMT_TYPE_CONSTANT(Type, constant)
 
#define FMT_BUILTIN   , monostate
 
#define FMT_USE_LOCALE   (FMT_OPTIMIZE_SIZE <= 1)
 

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 make_unsigned_t = typename std::make_unsigned<T>::type
 
template<typename T >
using underlying_t = typename std::underlying_type<T>::type
 
template<typename T >
using decay_t = typename std::decay<T>::type
 
using nullptr_t = decltype(nullptr)
 
template<typename... >
using void_t = void
 
template<typename Char >
using detail::unsigned_char = conditional_t<sizeof(Char) == 1, unsigned char, unsigned>
 
using string_view = basic_string_view<char>
 
using appender = basic_appender<char>
 
template<typename Char >
using basic_format_parse_context = parse_context<Char>
 
using format_parse_context = parse_context<char>
 
template<typename OutputIt , typename Char >
using basic_format_context
 
using format_context = context
 
template<typename Char >
using buffered_context
 
using format_args = basic_format_args<context>
 
template<typename S , typename V = decltype(detail::to_string_view(std::declval<S>()))>
using detail::char_t = typename V::value_type
 String's character (code unit) type. detail:: is intentional to prevent ADL.
 
using detail::long_type = conditional_t<long_short, int, long long>
 
using detail::ulong_type = conditional_t<long_short, unsigned, unsigned long long>
 
template<typename T >
using detail::format_as_result
 
template<typename T >
using detail::format_as_member_result
 
template<typename T , typename U = remove_const_t<T>>
using detail::use_formatter
 
template<typename T , typename Char >
using detail::mapped_t = decltype(detail::type_mapper<Char>::map(std::declval<T&>()))
 
template<typename T , typename Char = char>
using detail::mapped_type_constant = type_constant<mapped_t<T, Char>, Char>
 
template<typename T , typename Context , type TYPE = mapped_type_constant<T, typename Context::char_type>::value>
using detail::stored_type_constant
 
template<typename Context , int NUM_ARGS>
using detail::arg_t
 
template<typename... T>
using format_string = typename fstring<T...>::t
 
template<typename T , typename Char = char>
using is_formattable
 
using FMT_DEPRECATED = std::is_constructible<formatter<T, Char>>
 
template<typename... T>
using vargs
 

Enumerations

enum class  detail::int128_opt
 
enum class  detail::uint128_opt
 
enum  { detail::is_utf8_enabled = "\u00A7"[1] == '\xA7' }
 
enum  { detail::use_utf8 = !FMT_WIN32 || is_utf8_enabled }
 
enum class  presentation_type : unsigned char {
  none = 0 , debug = 1 , string = 2 , dec = 3 ,
  hex , oct , bin , chr ,
  pointer = 3 , exp = 1 , fixed , general ,
  hexfloat
}
 
enum class  align {
  none , left , right , center ,
  numeric
}
 
enum class  sign { none , minus , plus , space }
 
enum class  arg_id_kind { none , index , name }
 
enum class  detail::type {
  detail::none_type , detail::int_type , detail::uint_type , detail::long_long_type ,
  detail::ulong_long_type , detail::int128_type , detail::uint128_type , detail::bool_type ,
  detail::char_type , detail::last_integer_type = char_type , detail::float_type , detail::double_type ,
  detail::long_double_type , detail::last_numeric_type = long_double_type , detail::cstring_type , detail::string_type ,
  detail::pointer_type , detail::custom_type
}
 
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 class  detail::state {
  detail::start , detail::align , detail::sign , detail::hash ,
  detail::zero , detail::width , detail::precision , detail::locale
}
 
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 }
 

Functions

template<typename T >
constexpr auto min_of (T a, T b) -> T
 
template<typename T >
constexpr auto max_of (T a, T b) -> T
 
template<typename... T>
FMT_CONSTEXPR void detail::ignore_unused (const T &...)
 
constexpr auto detail::is_constant_evaluated (bool default_value=false) noexcept -> bool
 
template<typename T >
FMT_ALWAYS_INLINE constexpr auto detail::const_check (T val) -> T
 
FMT_FUNC void detail::assert_fail (const char *file, int line, const char *message)
 
auto detail::map (int128_opt) -> monostate
 
auto detail::map (uint128_opt) -> monostate
 
template<typename Int >
FMT_CONSTEXPR auto detail::to_unsigned (Int value) -> make_unsigned_t< Int >
 
template<typename T >
constexpr const char * detail::narrow (const T *)
 
constexpr FMT_ALWAYS_INLINE const char * detail::narrow (const char *s)
 
template<typename Char >
FMT_CONSTEXPR auto detail::compare (const Char *s1, const Char *s2, std::size_t n) -> int
 
template<typename Container >
auto detail::adl::invoke_back_inserter () -> decltype(back_inserter(std::declval< Container & >()))
 
template<typename OutputIt >
FMT_CONSTEXPR20 auto detail::get_container (OutputIt it) -> typename OutputIt::container_type &
 
FMT_NORETURN FMT_API void report_error (const char *message)
 Reports a format error at compile time or, via a format_error exception, at runtime.
 
template<typename Char , FMT_ENABLE_IF(is_char< Char >::value) >
constexpr auto detail::to_string_view (const Char *s) -> basic_string_view< Char >
 
template<typename T , FMT_ENABLE_IF(is_std_string_like< T >::value) >
constexpr auto detail::to_string_view (const T &s) -> basic_string_view< typename T::value_type >
 
template<typename Char >
constexpr auto detail::to_string_view (basic_string_view< Char > s) -> basic_string_view< Char >
 
 detail::FMT_TYPE_CONSTANT (int, int_type)
 
 detail::FMT_TYPE_CONSTANT (unsigned, uint_type)
 
 detail::FMT_TYPE_CONSTANT (long long, long_long_type)
 
 detail::FMT_TYPE_CONSTANT (unsigned long long, ulong_long_type)
 
 detail::FMT_TYPE_CONSTANT (int128_opt, int128_type)
 
 detail::FMT_TYPE_CONSTANT (uint128_opt, uint128_type)
 
 detail::FMT_TYPE_CONSTANT (bool, bool_type)
 
 detail::FMT_TYPE_CONSTANT (Char, char_type)
 
 detail::FMT_TYPE_CONSTANT (float, float_type)
 
 detail::FMT_TYPE_CONSTANT (double, double_type)
 
 detail::FMT_TYPE_CONSTANT (long double, long_double_type)
 
 detail::FMT_TYPE_CONSTANT (const Char *, cstring_type)
 
 detail::FMT_TYPE_CONSTANT (basic_string_view< Char >, string_type)
 
 detail::FMT_TYPE_CONSTANT (const void *, pointer_type)
 
constexpr auto detail::is_integral_type (type t) -> bool
 
constexpr auto detail::is_arithmetic_type (type t) -> bool
 
constexpr auto detail::set (type rhs) -> int
 
constexpr auto detail::in (type t, int set) -> bool
 
template<bool B = false>
constexpr auto detail::count () -> int
 
template<bool B1, bool B2, bool... Tail>
constexpr auto detail::count () -> int
 
template<typename... Args>
constexpr auto detail::count_named_args () -> int
 
template<typename... Args>
constexpr auto detail::count_static_named_args () -> int
 
template<typename Char , typename T , FMT_ENABLE_IF(!is_named_arg< T >::value) >
void detail::init_named_arg (named_arg_info< Char > *, int &arg_index, int &, const T &)
 
template<typename T , typename Char , FMT_ENABLE_IF(!is_static_named_arg< T >::value) >
FMT_CONSTEXPR void detail::init_static_named_arg (named_arg_info< Char > *, int &arg_index, int &)
 
template<typename Char , typename T , typename U = remove_const_t<T>>
auto detail::has_formatter_impl (T *p, buffered_context< Char > *ctx=nullptr) -> decltype(formatter< U, Char >().format(*p, *ctx), std::true_type())
 
template<typename Char >
auto detail::has_formatter_impl (...) -> std::false_type
 
template<typename T , typename Char >
constexpr auto detail::has_formatter () -> bool
 
template<typename Char , FMT_ENABLE_IF(std::is_integral< Char >::value) >
constexpr auto detail::to_ascii (Char c) -> char
 
template<typename Char >
FMT_CONSTEXPR auto detail::code_point_length (const Char *begin) -> int
 
template<typename Char >
FMT_CONSTEXPR auto detail::parse_nonnegative_int (const Char *&begin, const Char *end, int error_value) noexcept -> int
 
FMT_CONSTEXPR auto detail::parse_align (char c) -> align
 
template<typename Char >
constexpr auto detail::is_name_start (Char c) -> bool
 
template<typename Char , typename Handler >
FMT_CONSTEXPR 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, parse_context< Char > &ctx) -> parse_dynamic_spec_result< Char >
 
template<typename Char >
FMT_CONSTEXPR auto detail::parse_width (const Char *begin, const Char *end, format_specs &specs, arg_ref< Char > &width_ref, parse_context< Char > &ctx) -> const Char *
 
template<typename Char >
FMT_CONSTEXPR auto detail::parse_precision (const Char *begin, const Char *end, format_specs &specs, arg_ref< Char > &precision_ref, parse_context< Char > &ctx) -> const Char *
 
template<typename Char >
FMT_CONSTEXPR auto detail::parse_format_specs (const Char *begin, const Char *end, dynamic_format_specs< Char > &specs, parse_context< Char > &ctx, type arg_type) -> const Char *
 
template<typename Char , typename Handler >
FMT_CONSTEXPR FMT_INLINE auto detail::parse_replacement_field (const Char *begin, const Char *end, Handler &&handler) -> const Char *
 
template<typename Char , typename Handler >
FMT_CONSTEXPR void detail::parse_format_string (basic_string_view< Char > fmt, Handler &&handler)
 
FMT_CONSTEXPR auto detail::check_char_specs (const format_specs &specs) -> bool
 
template<typename T , typename Char >
FMT_CONSTEXPR auto detail::invoke_parse (parse_context< Char > &ctx) -> const Char *
 
template<typename T , typename InputIt , typename OutputIt , FMT_ENABLE_IF(is_back_insert_iterator< OutputIt >::value && has_back_insert_iterator_container_append< OutputIt, InputIt >::value) >
FMT_CONSTEXPR20 auto detail::copy (InputIt begin, InputIt end, OutputIt out) -> OutputIt
 
template<typename T , typename InputIt , typename OutputIt , FMT_ENABLE_IF(!is_back_insert_iterator< OutputIt >::value) >
FMT_CONSTEXPR auto detail::copy (InputIt begin, InputIt end, OutputIt out) -> OutputIt
 
template<typename T , typename V , typename OutputIt >
FMT_CONSTEXPR auto detail::copy (basic_string_view< V > s, OutputIt out) -> OutputIt
 
template<typename T , typename OutputIt , FMT_ENABLE_IF(!is_buffer_appender< OutputIt >::value) >
auto detail::get_buffer (OutputIt out) -> iterator_buffer< OutputIt, T >
 
template<typename Buf , typename OutputIt >
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 >
constexpr auto detail::encode_types () -> unsigned long long
 
template<typename Context , typename Arg , typename... Args>
constexpr auto detail::encode_types () -> unsigned long long
 
template<typename Context , typename... T, size_t NUM_ARGS = sizeof...(T)>
constexpr auto detail::make_descriptor () -> unsigned long long
 
template<typename T = int>
FMT_CONSTEXPR auto detail::is_locking () -> bool
 
template<typename T1 , typename T2 , typename... Tail>
FMT_CONSTEXPR auto detail::is_locking () -> bool
 
FMT_FUNC void detail::vformat_to (buffer< char > &buf, string_view fmt, format_args args, locale_ref loc)
 
void detail::vprint_mojibake (FILE *, string_view, const format_args &, bool)
 
auto runtime (string_view s) -> runtime_format_string<>
 Creates a runtime format string.
 
template<typename Context = context, typename... T, int NUM_ARGS = sizeof...(T), int NUM_NAMED_ARGS = detail::count_named_args<T...>(), unsigned long long DESC = detail::make_descriptor<Context, T...>()>
constexpr FMT_ALWAYS_INLINE auto make_format_args (T &... args) -> detail::format_arg_store< Context, NUM_ARGS, NUM_NAMED_ARGS, DESC >
 Constructs an object that stores references to arguments and can be implicitly converted to format_args.
 
template<typename Char , typename T >
auto arg (const Char *name, const T &arg) -> detail::named_arg< Char, T >
 Returns a named argument to be used in a formatting function.
 
template<typename OutputIt , FMT_ENABLE_IF(detail::is_output_iterator< remove_cvref_t< OutputIt >, char >::value) >
auto vformat_to (OutputIt &&out, string_view fmt, format_args args) -> remove_cvref_t< OutputIt >
 Formats a string and writes the output to out.
 
template<typename OutputIt , typename... T, FMT_ENABLE_IF(detail::is_output_iterator< remove_cvref_t< OutputIt >, char >::value) >
FMT_INLINE auto format_to (OutputIt &&out, format_string< T... > fmt, T &&... args) -> remove_cvref_t< OutputIt >
 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.
 
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 >
 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.
 
template<size_t N>
auto vformat_to (char(&out)[N], string_view fmt, format_args args) -> format_to_result
 
template<size_t N, typename... T>
FMT_INLINE auto format_to (char(&out)[N], format_string< T... > fmt, T &&... args) -> format_to_result
 
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...).
 
FMT_API void vprint (string_view fmt, format_args args)
 
FMT_API void vprint (FILE *f, string_view fmt, format_args args)
 
FMT_API void vprintln (FILE *f, string_view fmt, format_args args)
 
FMT_API void vprint_buffered (FILE *f, string_view fmt, format_args args)
 
template<typename... T>
FMT_INLINE void print (format_string< T... > fmt, T &&... args)
 Formats args according to specifications in fmt and writes the output to stdout.
 
template<typename... T>
FMT_INLINE void print (FILE *f, format_string< T... > fmt, T &&... args)
 Formats args according to specifications in fmt and writes the output to the file f.
 
template<typename... T>
FMT_INLINE void println (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.
 
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.
 

Macro Definition Documentation

◆ FMT_ALWAYS_INLINE

#define FMT_ALWAYS_INLINE   inline

◆ FMT_API

#define FMT_API

◆ FMT_APPLY_VARIADIC

#define FMT_APPLY_VARIADIC ( expr)
Value:
using ignore = int[]; \
(void)ignore { 0, (expr, 0)... }

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

#define FMT_BEGIN_EXPORT

◆ FMT_BEGIN_NAMESPACE

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

◆ FMT_BUILTIN

#define FMT_BUILTIN   , monostate

◆ FMT_BUILTIN_TYPES

#define FMT_BUILTIN_TYPES   1

◆ FMT_CATCH

#define FMT_CATCH ( x)
Value:
if (false)

◆ FMT_CLANG_VERSION

#define FMT_CLANG_VERSION   0

◆ FMT_CONSTEVAL

#define FMT_CONSTEVAL

◆ FMT_CONSTEXPR

#define FMT_CONSTEXPR

◆ FMT_CONSTEXPR20

#define FMT_CONSTEXPR20

◆ FMT_CPLUSPLUS

#define FMT_CPLUSPLUS   __cplusplus

◆ FMT_DEPRECATED

#define FMT_DEPRECATED   /* deprecated */

◆ FMT_ENABLE_IF

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

◆ FMT_END_EXPORT

#define FMT_END_EXPORT

◆ FMT_END_NAMESPACE

#define FMT_END_NAMESPACE
Value:
} \
}

◆ FMT_EXPORT

#define FMT_EXPORT

◆ FMT_FALLTHROUGH

#define FMT_FALLTHROUGH

◆ FMT_GCC_VERSION

#define FMT_GCC_VERSION   0

◆ FMT_GLIBCXX_RELEASE

#define FMT_GLIBCXX_RELEASE   0

◆ FMT_HAS_BUILTIN

#define FMT_HAS_BUILTIN ( x)
Value:
0

◆ FMT_HAS_CPP14_ATTRIBUTE

#define FMT_HAS_CPP14_ATTRIBUTE ( attribute)
Value:
(FMT_CPLUSPLUS >= 201402L && FMT_HAS_CPP_ATTRIBUTE(attribute))
#define FMT_HAS_CPP_ATTRIBUTE(x)
Definition base.h:87
#define FMT_CPLUSPLUS
Definition base.h:65

◆ FMT_HAS_CPP17_ATTRIBUTE

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

◆ FMT_HAS_CPP_ATTRIBUTE

#define FMT_HAS_CPP_ATTRIBUTE ( x)
Value:
0

◆ FMT_HAS_FEATURE

#define FMT_HAS_FEATURE ( x)
Value:
0

◆ FMT_HAS_INCLUDE

#define FMT_HAS_INCLUDE ( x)
Value:
0

◆ FMT_ICC_VERSION

#define FMT_ICC_VERSION   0

◆ FMT_INLINE

#define FMT_INLINE   inline

◆ FMT_LIBCPP_VERSION

#define FMT_LIBCPP_VERSION   0

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

#define FMT_OPTIMIZE_SIZE   0

◆ FMT_PRAGMA_CLANG

#define FMT_PRAGMA_CLANG ( x)

◆ FMT_PRAGMA_GCC

#define FMT_PRAGMA_GCC ( x)

◆ FMT_PRAGMA_IMPL

#define FMT_PRAGMA_IMPL ( x)
Value:
_Pragma(#x)

◆ FMT_TRY

#define FMT_TRY   if (true)

◆ FMT_TYPE_CONSTANT

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

◆ FMT_UNICODE

#define FMT_UNICODE   1

◆ FMT_USE_BITINT

#define FMT_USE_BITINT   (FMT_CLANG_VERSION >= 1500)

◆ FMT_USE_CONSTEVAL

#define FMT_USE_CONSTEVAL   0

◆ FMT_USE_CONSTEXPR

#define FMT_USE_CONSTEXPR   0

◆ FMT_USE_EXCEPTIONS

#define FMT_USE_EXCEPTIONS   1

◆ FMT_USE_INT128

#define FMT_USE_INT128   0

◆ FMT_USE_LOCALE

#define FMT_USE_LOCALE   (FMT_OPTIMIZE_SIZE <= 1)

◆ FMT_VERSION

#define FMT_VERSION   110100

◆ FMT_VISIBILITY

#define FMT_VISIBILITY ( value)

◆ FMT_WIN32

#define FMT_WIN32   0

Typedef Documentation

◆ appender

using appender = basic_appender<char>

◆ basic_format_context

template<typename OutputIt , typename Char >
using basic_format_context
Initial value:
Definition base.h:2607
Definition format.h:3678
typename std::conditional< B, T, F >::type conditional_t
Definition base.h:299

◆ basic_format_parse_context

template<typename Char >
using basic_format_parse_context = parse_context<Char>

◆ bool_constant

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

◆ buffered_context

◆ conditional_t

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

◆ decay_t

template<typename T >
using decay_t = typename std::decay<T>::type

◆ enable_if_t

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

◆ FMT_DEPRECATED

using FMT_DEPRECATED = std::is_constructible<formatter<T, Char>>

◆ format_args

◆ format_context

◆ format_parse_context

◆ format_string

template<typename... T>
using format_string = typename fstring<T...>::t

◆ is_formattable

template<typename T , typename Char = char>
using is_formattable
Initial value:
bool_constant<!std::is_same<
void>::value>
decltype(detail::type_mapper< Char >::map(std::declval< T & >())) mapped_t
Definition base.h:1175
std::integral_constant< bool, B > bool_constant
Definition base.h:300

◆ make_unsigned_t

template<typename T >
using make_unsigned_t = typename std::make_unsigned<T>::type

◆ nullptr_t

using nullptr_t = decltype(nullptr)

◆ 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

◆ string_view

◆ underlying_t

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

◆ vargs

template<typename... T>
using vargs
Initial value:
constexpr auto count_named_args() -> int
Definition base.h:1033
constexpr auto make_descriptor() -> unsigned long long
Definition base.h:2280
Definition base.h:2323

◆ void_t

template<typename... >
using void_t = void

Enumeration Type Documentation

◆ align

enum class align
strong
Enumerator
none 
left 
right 
center 
numeric 

◆ arg_id_kind

enum class arg_id_kind
strong
Enumerator
none 
index 
name 

◆ presentation_type

enum class presentation_type : unsigned char
strong
Enumerator
none 
debug 
string 
dec 
hex 
oct 
bin 
chr 
pointer 
exp 
fixed 
general 
hexfloat 

◆ sign

enum class sign
strong
Enumerator
none 
minus 
plus 
space 

Function Documentation

◆ arg()

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

Returns a named argument to be used in a formatting function.

It should only be used in a call to a formatting function.

Example:

fmt::print("The answer is {answer}.", fmt::arg("answer", 42));

◆ format_to() [1/2]

template<size_t N, typename... T>
FMT_INLINE auto format_to ( char(&) out[N],
format_string< T... > fmt,
T &&... args ) -> format_to_result

◆ format_to() [2/2]

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

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

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

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.

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

◆ make_format_args()

template<typename Context = context, typename... T, int NUM_ARGS = sizeof...(T), int NUM_NAMED_ARGS = detail::count_named_args<T...>(), unsigned long long DESC = detail::make_descriptor<Context, T...>()>
FMT_ALWAYS_INLINE auto make_format_args ( T &... args) -> detail::format_arg_store<Context, NUM_ARGS, NUM_NAMED_ARGS, DESC>
constexpr

Constructs an object that stores references to arguments and can be implicitly converted to format_args.

Context can be omitted in which case it defaults to context. See arg for lifetime considerations.

◆ max_of()

template<typename T >
auto max_of ( T a,
T b ) -> T
constexpr

◆ min_of()

template<typename T >
auto min_of ( T a,
T b ) -> T
constexpr

◆ print() [1/2]

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

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

Example:

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

◆ print() [2/2]

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

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

Example:

fmt::print("The answer is {}.", 42);

◆ println() [1/2]

template<typename... T>
FMT_INLINE void println ( 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.

◆ println() [2/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.

◆ report_error()

FMT_NORETURN FMT_API void report_error ( const char * message)

Reports a format error at compile time or, via a format_error exception, at runtime.

◆ runtime()

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

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");

◆ vformat_to() [1/2]

template<size_t N>
auto vformat_to ( char(&) out[N],
string_view fmt,
format_args args ) -> format_to_result

◆ vformat_to() [2/2]

template<typename OutputIt , FMT_ENABLE_IF(detail::is_output_iterator< remove_cvref_t< OutputIt >, char >::value) >
auto vformat_to ( OutputIt && out,
string_view fmt,
format_args args ) -> remove_cvref_t<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>

◆ vprint() [1/2]

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

◆ vprint() [2/2]

FMT_API void vprint ( string_view fmt,
format_args args )

◆ vprint_buffered()

FMT_API void vprint_buffered ( FILE * f,
string_view fmt,
format_args args )

◆ vprintln()

FMT_API void vprintln ( FILE * f,
string_view fmt,
format_args args )