|
STIR
6.3.0
|
Converts a string literal into a format string that will be parsed at compile time and converted into efficient formatting code. More...
Classes | |
| class | buffer |
A contiguous memory buffer with an optional growing ability. It is an internal class and shouldn't be used directly, only via memory_buffer. More... | |
Typedefs | |
| template<typename Char > | |
| using | unsigned_char = conditional_t< sizeof(Char)==1, unsigned char, unsigned > |
| template<typename S , typename V = decltype(detail::to_string_view(std::declval<S>()))> | |
| using | char_t = typename V::value_type |
| String's character (code unit) type. detail:: is intentional to prevent ADL. | |
| using | long_type = conditional_t< long_short, int, long long > |
| using | ulong_type = conditional_t< long_short, unsigned, unsigned long long > |
| template<typename T > | |
| using | format_as_result = remove_cvref_t< decltype(format_as(std::declval< const T & >()))> |
| template<typename T > | |
| using | format_as_member_result = remove_cvref_t< decltype(formatter< T >::format_as(std::declval< const T & >()))> |
| template<typename T , typename U = remove_const_t<T>> | |
| using | use_formatter = bool_constant<(std::is_class< T >::value||std::is_enum< T >::value||std::is_union< T >::value||std::is_array< T >::value) &&!has_to_string_view< T >::value &&!is_named_arg< T >::value &&!use_format_as< T >::value &&!use_format_as_member< U >::value > |
| template<typename T , typename Char > | |
| using | mapped_t = decltype(detail::type_mapper< Char >::map(std::declval< T & >())) |
| template<typename T , typename Char = char> | |
| using | 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 | stored_type_constant = std::integral_constant< type, Context::builtin_types||TYPE==type::int_type ? TYPE :type::custom_type > |
| template<typename Context , int NUM_ARGS> | |
| using | arg_t = conditional_t< NUM_ARGS<=max_packed_args, value< Context >, basic_format_arg< Context > > |
| template<typename T , typename U > | |
| using | is_similar_arithmetic_type = bool_constant<(std::is_integral< T >::value &&std::is_integral< U >::value)||(std::is_floating_point< T >::value &&std::is_floating_point< U >::value)> |
| using | file_ref = decltype(get_file(static_cast< FILE * >(nullptr), 0)) |
| using | uint128_t = conditional_t< FMT_USE_INT128, uint128_opt, uint128_fallback > |
| using | uintptr_t = uint128_t |
| template<typename OutputIt > | |
| using | reserve_iterator = remove_reference_t< decltype(reserve(std::declval< OutputIt & >(), 0))> |
| template<typename T > | |
| using | is_signed = std::integral_constant< bool, std::numeric_limits< T >::is_signed||std::is_same< T, int128_opt >::value > |
| template<typename T > | |
| using | is_integer = bool_constant< is_integral< T >::value &&!std::is_same< T, bool >::value &&!std::is_same< T, char >::value &&!std::is_same< T, wchar_t >::value > |
| template<typename T > | |
| using | is_float128 = std::is_same< T, float128 > |
| template<typename T > | |
| using | uint32_or_64_or_128_t = conditional_t< num_bits< T >()<=32 &&!FMT_REDUCE_INT_INSTANTIATIONS, uint32_t, conditional_t< num_bits< T >()<=64, uint64_t, uint128_t > > |
| template<typename T > | |
| using | uint64_or_128_t = conditional_t< num_bits< T >()<=64, uint64_t, uint128_t > |
| using | fp = basic_fp< unsigned long long > |
| template<typename T , bool doublish = num_bits<T>() == num_bits<double>()> | |
| using | convert_float_result = conditional_t< std::is_same< T, float >::value||doublish, double, T > |
| template<typename T > | |
| using | is_builtin = bool_constant< std::is_same< T, int >::value||FMT_BUILTIN_TYPES > |
| using | format_func = void(*)(detail::buffer< char > &, int, const char *) |
| template<size_t... N> | |
| using | index_sequence = integer_sequence< size_t, N... > |
| template<size_t N> | |
| using | make_index_sequence = make_integer_sequence< size_t, N > |
| template<typename T > | |
| using | tuple_index_sequence = make_index_sequence< std::tuple_size< T >::value > |
| template<typename Range > | |
| using | range_reference_type = decltype(*detail::range_begin(std::declval< Range & >())) |
| template<typename Range > | |
| using | uncvref_type = remove_cvref_t< range_reference_type< Range > > |
| template<range_format K> | |
| using | range_format_constant = std::integral_constant< range_format, K > |
| template<typename Char , typename Element > | |
| using | range_formatter_type = formatter< remove_cvref_t< Element >, Char > |
| template<typename R > | |
| using | maybe_const_range = conditional_t< has_const_begin_end< R >::value, const R, R > |
| template<typename T > | |
| using | is_exotic_char = bool_constant<!std::is_same< T, char >::value > |
| template<typename S > | |
| using | format_string_char_t = typename format_string_char< S >::type |
| using | scan_iterator = scan_buffer::iterator |
| using | scan_sentinel = scan_buffer::sentinel |
Functions | |
| template<typename T > | |
| auto | unwrap (const T &v) -> const T & |
| template<typename T > | |
| auto | unwrap (const std::reference_wrapper< T > &v) -> const T & |
| template<typename... T> | |
| FMT_CONSTEXPR void | ignore_unused (const T &...) |
| constexpr auto | is_constant_evaluated (bool default_value=false) noexcept -> bool |
| template<typename T > | |
| FMT_ALWAYS_INLINE constexpr auto | const_check (T val) -> T |
| FMT_NORETURN FMT_API void | assert_fail (const char *file, int line, const char *message) |
| auto | map (int128_opt) -> monostate |
| auto | map (uint128_opt) -> monostate |
| template<typename Int > | |
| FMT_CONSTEXPR auto | to_unsigned (Int value) -> make_unsigned_t< Int > |
| template<typename T > | |
| constexpr auto | narrow (T *) -> char * |
| constexpr FMT_ALWAYS_INLINE auto | narrow (const char *s) -> const char * |
| template<typename Char > | |
| FMT_CONSTEXPR auto | compare (const Char *s1, const Char *s2, size_t n) -> int |
| template<typename OutputIt > | |
| FMT_CONSTEXPR20 auto | get_container (OutputIt it) -> typename OutputIt::container_type & |
| template<typename Char , FMT_ENABLE_IF(is_code_unit< Char >::value) > | |
| constexpr auto | to_string_view (const Char *s) -> basic_string_view< Char > |
| template<typename T , FMT_ENABLE_IF(is_std_string_like< T >::value) > | |
| constexpr auto | to_string_view (const T &s) -> basic_string_view< typename T::value_type > |
| template<typename Char > | |
| constexpr auto | to_string_view (basic_string_view< Char > s) -> basic_string_view< Char > |
| 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 auto | is_integral_type (type t) -> bool |
| constexpr auto | is_arithmetic_type (type t) -> bool |
| constexpr auto | set (type rhs) -> int |
| constexpr auto | in (type t, int set) -> bool |
| template<bool B = false> | |
| constexpr auto | count () -> int |
| template<bool B1, bool B2, bool... Tail> | |
| constexpr auto | count () -> int |
| template<typename... T> | |
| constexpr auto | count_named_args () -> int |
| template<typename... T> | |
| constexpr auto | count_static_named_args () -> int |
| template<typename Char > | |
| FMT_CONSTEXPR void | check_for_duplicate (named_arg_info< Char > *named_args, int named_arg_index, basic_string_view< Char > arg_name) |
| template<typename Char , typename T , FMT_ENABLE_IF(!is_named_arg< T >::value) > | |
| void | 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 | init_static_named_arg (named_arg_info< Char > *, int &arg_index, int &) |
| template<typename Char , typename T , typename U = remove_const_t<T>> | |
| auto | has_formatter_impl (T *p, buffered_context< Char > *ctx=nullptr) -> decltype(formatter< U, Char >().format(*p, *ctx), std::true_type()) |
| template<typename Char > | |
| auto | has_formatter_impl (...) -> std::false_type |
| template<typename T , typename Char > | |
| constexpr auto | has_formatter () -> bool |
| template<typename Char , FMT_ENABLE_IF(std::is_integral< Char >::value) > | |
| constexpr auto | to_ascii (Char c) -> char |
| template<typename Char > | |
| FMT_CONSTEXPR auto | code_point_length (const Char *begin) -> int |
| template<typename Char > | |
| FMT_CONSTEXPR auto | parse_nonnegative_int (const Char *&begin, const Char *end, int error_value) noexcept -> int |
| FMT_CONSTEXPR auto | parse_align (char c) -> align |
| template<typename Char > | |
| constexpr auto | is_name_start (Char c) -> bool |
| template<typename Char , typename Handler > | |
| FMT_CONSTEXPR auto | parse_arg_id (const Char *begin, const Char *end, Handler &&handler) -> const Char * |
| template<typename Char > | |
| FMT_CONSTEXPR auto | 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 | 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 | 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 | 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 | parse_replacement_field (const Char *begin, const Char *end, Handler &&handler) -> const Char * |
| template<typename Char , typename Handler > | |
| FMT_CONSTEXPR void | parse_format_string (basic_string_view< Char > fmt, Handler &&handler) |
| FMT_CONSTEXPR auto | check_char_specs (const format_specs &specs) -> bool |
| template<typename T , typename Char > | |
| FMT_VISIBILITY ("hidden") FMT_CONSTEXPR auto 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 | copy (InputIt begin, InputIt end, OutputIt out) -> OutputIt |
| 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|| has_back_insert_iterator_container_insert_at_end< OutputIt, InputIt >::value))) > | |
| FMT_CONSTEXPR auto | copy (InputIt begin, InputIt end, OutputIt out) -> OutputIt |
| template<typename T , typename V , typename OutputIt > | |
| FMT_CONSTEXPR auto | copy (basic_string_view< V > s, OutputIt out) -> OutputIt |
| template<typename T , typename OutputIt , FMT_ENABLE_IF(!is_buffer_appender< OutputIt >::value) > | |
| auto | get_buffer (OutputIt out) -> iterator_buffer< OutputIt, T > |
| template<typename Buf , typename OutputIt > | |
| auto | get_iterator (Buf &buf, OutputIt) -> decltype(buf.out()) |
| template<typename T , typename OutputIt > | |
| auto | get_iterator (buffer< T > &, OutputIt out) -> OutputIt |
| template<typename > | |
| constexpr auto | encode_types () -> unsigned long long |
| template<typename Context , typename First , typename... T> | |
| constexpr auto | encode_types () -> unsigned long long |
| template<typename Context , typename... T, size_t NUM_ARGS = sizeof...(T)> | |
| constexpr auto | make_descriptor () -> unsigned long long |
| template<typename T = int> | |
| FMT_CONSTEXPR auto | is_locking () -> bool |
| template<typename T1 , typename T2 , typename... Tail> | |
| FMT_CONSTEXPR auto | is_locking () -> bool |
| FMT_API void | vformat_to (buffer< char > &buf, string_view fmt, format_args args, locale_ref loc={}) |
| void | vprint_mojibake (FILE *, string_view, const format_args &, bool) |
| auto | gmtime_r (...) -> null<> |
| auto | gmtime_s (...) -> null<> |
| auto | get_classic_locale () -> const std::locale & |
| template<typename CodeUnit > | |
| void | write_codecvt (codecvt_result< CodeUnit > &out, string_view in, const std::locale &loc) |
| template<typename OutputIt > | |
| auto | write_encoded_tm_str (OutputIt out, string_view in, const std::locale &loc) -> OutputIt |
| template<typename Char , typename OutputIt , FMT_ENABLE_IF(!std::is_same< Char, char >::value) > | |
| auto | write_tm_str (OutputIt out, string_view sv, const std::locale &loc) -> OutputIt |
| template<typename Char > | |
| void | do_write (buffer< Char > &buf, const std::tm &time, const std::locale &loc, char format, char modifier) |
| template<typename Char , typename OutputIt , FMT_ENABLE_IF(!std::is_same< Char, char >::value) > | |
| auto | write (OutputIt out, const std::tm &time, const std::locale &loc, char format, char modifier=0) -> OutputIt |
| FMT_NORETURN void | throw_duration_error () |
| template<typename To , typename FromRep , typename FromPeriod , FMT_ENABLE_IF(std::is_integral< FromRep >::value && std::is_integral< typename To::rep >::value) > | |
| auto | duration_cast (std::chrono::duration< FromRep, FromPeriod > from) -> To |
| template<typename Duration > | |
| auto | to_time_t (sys_time< Duration > time_point) -> std::time_t |
| void | write_digit2_separated (char *buf, unsigned a, unsigned b, unsigned c, char sep) |
| template<typename Period > | |
| FMT_CONSTEXPR auto | get_units () -> const char * |
| template<typename OutputIt > | |
| auto | write_padding (OutputIt out, pad_type pad, int width) -> OutputIt |
| template<typename OutputIt > | |
| auto | write_padding (OutputIt out, pad_type pad) -> OutputIt |
| template<typename Char , typename Handler > | |
| FMT_CONSTEXPR auto | parse_chrono_format (const Char *begin, const Char *end, Handler &&handler) -> const Char * |
| auto | tm_wday_full_name (int wday) -> const char * |
| auto | tm_wday_short_name (int wday) -> const char * |
| auto | tm_mon_full_name (int mon) -> const char * |
| auto | tm_mon_short_name (int mon) -> const char * |
| template<typename T , FMT_ENABLE_IF(has_tm_zone< T >::value) > | |
| auto | set_tm_zone (T &time, char *tz) -> bool |
| auto | utc () -> char * |
| template<typename T , typename Int , FMT_ENABLE_IF(std::is_integral< T >::value) > | |
| auto | to_nonnegative_int (T value, Int upper) -> Int |
| constexpr auto | pow10 (std::uint32_t n) -> long long |
| template<typename Char , typename OutputIt , typename Duration > | |
| void | write_fractional_seconds (OutputIt &out, Duration d, int precision=-1) |
| template<typename Duration > | |
| void | write_floating_seconds (memory_buffer &buf, Duration duration, int num_fractional_digits=-1) |
| template<typename T , FMT_ENABLE_IF(std::is_integral< T >::value &&has_isfinite< T >::value) > | |
| auto | isfinite (T) -> bool |
| template<typename T , FMT_ENABLE_IF(std::is_integral< T >::value) > | |
| auto | mod (T x, int y) -> T |
| template<typename Rep , typename Period , FMT_ENABLE_IF(std::is_integral< Rep >::value) > | |
| auto | get_milliseconds (std::chrono::duration< Rep, Period > d) -> std::chrono::duration< Rep, std::milli > |
| template<typename Char , typename Rep , typename OutputIt , FMT_ENABLE_IF(std::is_integral< Rep >::value) > | |
| auto | format_duration_value (OutputIt out, Rep val, int) -> OutputIt |
| template<typename Char , typename OutputIt > | |
| auto | copy_unit (string_view unit, OutputIt out, Char) -> OutputIt |
| template<typename OutputIt > | |
| auto | copy_unit (string_view unit, OutputIt out, wchar_t) -> OutputIt |
| template<typename Char , typename Period , typename OutputIt > | |
| auto | format_duration_unit (OutputIt out) -> OutputIt |
| template<typename Char > | |
| FMT_CONSTEXPR auto | make_foreground_color (color_type foreground) noexcept -> ansi_color_escape< Char > |
| template<typename Char > | |
| FMT_CONSTEXPR auto | make_background_color (color_type background) noexcept -> ansi_color_escape< Char > |
| template<typename Char > | |
| FMT_CONSTEXPR auto | make_emphasis (emphasis em) noexcept -> ansi_color_escape< Char > |
| template<typename Char > | |
| void | reset_color (buffer< Char > &buffer) |
| template<typename Char > | |
| void | vformat_to (buffer< Char > &buf, text_style ts, basic_string_view< Char > fmt, basic_format_args< buffered_context< Char >> args) |
| template<typename T , typename... Tail> | |
| constexpr auto | first (const T &value, const Tail &...) -> const T & |
| FMT_FUNC void | format_error_code (detail::buffer< char > &out, int error_code, string_view message) noexcept |
| FMT_FUNC void | do_report_error (format_func func, int error_code, const char *message) noexcept |
| void | fwrite_all (const void *ptr, size_t count, FILE *stream) |
| template<typename Char > | |
| FMT_FUNC auto | thousands_sep_impl (locale_ref loc) -> thousands_sep_result< Char > |
| template<typename Char > | |
| FMT_FUNC auto | decimal_point_impl (locale_ref loc) -> Char |
| FMT_FUNC auto | write_loc (appender out, loc_value value, const format_specs &specs, locale_ref loc) -> bool |
| template<typename F > | |
| auto | operator== (basic_fp< F > x, basic_fp< F > y) -> bool |
| FMT_INLINE auto | rotr (uint32_t n, uint32_t r) noexcept -> uint32_t |
| FMT_INLINE auto | rotr (uint64_t n, uint32_t r) noexcept -> uint64_t |
| template<typename F > | |
| auto | flockfile (F *f) -> decltype(_lock_file(f)) |
| template<typename F > | |
| auto | funlockfile (F *f) -> decltype(_unlock_file(f)) |
| template<typename F > | |
| auto | getc_unlocked (F *f) -> decltype(_fgetc_nolock(f)) |
| template<typename F , FMT_ENABLE_IF(sizeof(F::_p) !=0 &&!FMT_USE_FALLBACK_FILE) > | |
| auto | get_file (F *f, int) -> apple_file< F > |
| auto | get_file (FILE *f,...) -> fallback_file< FILE > |
| FMT_FUNC auto | write_console (int, string_view) -> bool |
| FMT_FUNC void | print (std::FILE *f, string_view text) |
| auto | is_printable (uint16_t x, const singleton *singletons, size_t singletons_size, const unsigned char *singleton_lowers, const unsigned char *normal, size_t normal_size) -> bool |
| FMT_FUNC auto | is_printable (uint32_t cp) -> bool |
| FMT_CONSTEXPR void | abort_fuzzing_if (bool condition) |
| template<typename To , typename From , FMT_ENABLE_IF(sizeof(To)==sizeof(From)) > | |
| FMT_CONSTEXPR20 auto | bit_cast (const From &from) -> To |
| auto | is_big_endian () -> bool |
| template<typename T > | |
| constexpr auto | max_value () -> T |
| template<typename T > | |
| constexpr auto | num_bits () -> int |
| template<> | |
| constexpr auto | num_bits< int128_opt > () -> int |
| template<> | |
| constexpr auto | num_bits< uint128_opt > () -> int |
| template<> | |
| constexpr auto | num_bits< uint128_fallback > () -> int |
| template<typename To , typename From , FMT_ENABLE_IF(sizeof(To) > sizeof(From)) > | |
| auto | bit_cast (const From &from) -> To |
| template<typename UInt > | |
| FMT_CONSTEXPR20 auto | countl_zero_fallback (UInt n) -> int |
| FMT_CONSTEXPR20 auto | countl_zero (uint32_t n) -> int |
| FMT_CONSTEXPR20 auto | countl_zero (uint64_t n) -> int |
| FMT_INLINE void | assume (bool condition) |
| template<typename OutputIt , FMT_ENABLE_IF(is_back_insert_iterator< OutputIt >::value && is_contiguous< typename OutputIt::container >::value) > | |
| FMT_CONSTEXPR20 auto | reserve (OutputIt it, size_t n) -> typename OutputIt::value_type * |
| template<typename T > | |
| FMT_CONSTEXPR20 auto | reserve (basic_appender< T > it, size_t n) -> basic_appender< T > |
| template<typename Iterator > | |
| constexpr auto | reserve (Iterator &it, size_t) -> Iterator & |
| template<typename T , typename OutputIt > | |
| constexpr auto | to_pointer (OutputIt, size_t) -> T * |
| template<typename T > | |
| FMT_CONSTEXPR auto | to_pointer (T *&ptr, size_t n) -> T * |
| template<typename T > | |
| FMT_CONSTEXPR20 auto | to_pointer (basic_appender< T > it, size_t n) -> T * |
| template<typename OutputIt , FMT_ENABLE_IF(is_back_insert_iterator< OutputIt >::value && is_contiguous< typename OutputIt::container >::value) > | |
| auto | base_iterator (OutputIt it, typename OutputIt::container_type::value_type *) -> OutputIt |
| template<typename Iterator > | |
| constexpr auto | base_iterator (Iterator, Iterator it) -> Iterator |
| template<typename OutputIt , typename Size , typename T > | |
| FMT_CONSTEXPR auto | fill_n (OutputIt out, Size count, const T &value) -> OutputIt |
| template<typename T , typename Size > | |
| FMT_CONSTEXPR20 auto | fill_n (T *out, Size count, char value) -> T * |
| template<typename OutChar , typename InputIt , typename OutputIt > | |
| FMT_CONSTEXPR FMT_NOINLINE auto | copy_noinline (InputIt begin, InputIt end, OutputIt out) -> OutputIt |
| FMT_CONSTEXPR auto | utf8_decode (const char *s, uint32_t *c, int *e) -> const char * |
| template<typename F > | |
| FMT_CONSTEXPR void | for_each_codepoint (string_view s, F f) |
| FMT_CONSTEXPR auto | display_width_of (uint32_t cp) noexcept -> size_t |
| template<typename T , bool = is_floating_point<T>::value> | |
| detail::is_fast_float bool_constant T | deallocate (T *p, size_t) |
| constexpr friend auto | operator== (allocator, allocator) noexcept -> bool |
| constexpr friend auto | operator!= (allocator, allocator) noexcept -> bool |
| FMT_API void | print (FILE *, string_view) |
| template<typename Char , size_t N> | |
| FMT_EXPORT constexpr auto | compile_string_to_view (const Char(&s)[N]) -> basic_string_view< Char > |
| template<typename Char > | |
| FMT_EXPORT constexpr auto | compile_string_to_view (basic_string_view< Char > s) -> basic_string_view< Char > |
| template<typename T , FMT_ENABLE_IF(is_signed< T >::value) > | |
| constexpr auto | is_negative (T value) -> bool |
| auto | digits2 (size_t value) -> const char * |
| template<typename Char > | |
| constexpr auto | getsign (sign s) -> Char |
| template<typename T > | |
| FMT_CONSTEXPR auto | count_digits_fallback (T n) -> int |
| auto | do_count_digits (uint64_t n) -> int |
| FMT_CONSTEXPR20 auto | count_digits (uint64_t n) -> int |
| template<int BITS, typename UInt > | |
| FMT_CONSTEXPR auto | count_digits (UInt n) -> int |
| FMT_INLINE auto | do_count_digits (uint32_t n) -> int |
| FMT_CONSTEXPR20 auto | count_digits (uint32_t n) -> int |
| template<typename Int > | |
| constexpr auto | digits10 () noexcept -> int |
| template<> | |
| constexpr auto | digits10< int128_opt > () noexcept -> int |
| template<> | |
| constexpr auto | digits10< uint128_t > () noexcept -> int |
| template<typename Char > | |
| FMT_API auto | thousands_sep_impl (locale_ref loc) -> thousands_sep_result< Char > |
| template<typename Char > | |
| auto | thousands_sep (locale_ref loc) -> thousands_sep_result< Char > |
| template<> | |
| auto | thousands_sep (locale_ref loc) -> thousands_sep_result< wchar_t > |
| template<typename Char > | |
| FMT_API auto | decimal_point_impl (locale_ref loc) -> Char |
| template<typename Char > | |
| auto | decimal_point (locale_ref loc) -> Char |
| template<> | |
| auto | decimal_point (locale_ref loc) -> wchar_t |
| FMT_BEGIN_EXPORT template FMT_API auto | thousands_sep_impl< char > (locale_ref) -> thousands_sep_result< char > |
| template FMT_API auto | thousands_sep_impl< wchar_t > (locale_ref) -> thousands_sep_result< wchar_t > |
| template<typename Char > | |
| FMT_END_EXPORT auto | equal2 (const Char *lhs, const char *rhs) -> bool |
| auto | equal2 (const char *lhs, const char *rhs) -> bool |
| template<typename Char > | |
| FMT_CONSTEXPR20 FMT_INLINE void | write2digits (Char *out, size_t value) |
| template<typename Char , typename UInt > | |
| FMT_CONSTEXPR20 auto | do_format_decimal (Char *out, UInt value, int size) -> Char * |
| template<typename Char , typename UInt > | |
| FMT_CONSTEXPR FMT_INLINE auto | format_decimal (Char *out, UInt value, int num_digits) -> Char * |
| template<typename Char , typename UInt , typename OutputIt , FMT_ENABLE_IF(!std::is_pointer< remove_cvref_t< OutputIt >>::value) > | |
| FMT_CONSTEXPR auto | format_decimal (OutputIt out, UInt value, int num_digits) -> OutputIt |
| template<typename Char , typename UInt > | |
| FMT_CONSTEXPR auto | do_format_base2e (int base_bits, Char *out, UInt value, int size, bool upper=false) -> Char * |
| template<typename Char , typename UInt > | |
| FMT_CONSTEXPR auto | format_base2e (int base_bits, Char *out, UInt value, int num_digits, bool upper=false) -> Char * |
| template<typename Char , typename OutputIt , typename UInt , FMT_ENABLE_IF(is_back_insert_iterator< OutputIt >::value) > | |
| FMT_CONSTEXPR auto | format_base2e (int base_bits, OutputIt out, UInt value, int num_digits, bool upper=false) -> OutputIt |
| FMT_INLINE auto | umul128 (uint64_t x, uint64_t y) noexcept -> uint128_fallback |
| template<typename Float > | |
| constexpr auto | has_implicit_bit () -> bool |
| template<typename Float > | |
| constexpr auto | num_significand_bits () -> int |
| template<typename Float > | |
| constexpr auto | exponent_mask () -> typename dragonbox::float_info< Float >::carrier_uint |
| template<typename Float > | |
| constexpr auto | exponent_bias () -> int |
| FMT_CONSTEXPR auto | compute_exp_size (int exp) -> int |
| template<typename Char , typename OutputIt > | |
| FMT_CONSTEXPR auto | write_exponent (int exp, OutputIt out) -> OutputIt |
| template<int SHIFT = 0, typename F > | |
| FMT_CONSTEXPR auto | normalize (basic_fp< F > value) -> basic_fp< F > |
| FMT_CONSTEXPR auto | multiply (uint64_t lhs, uint64_t rhs) -> uint64_t |
| FMT_CONSTEXPR auto | operator* (fp x, fp y) -> fp |
| template<typename T > | |
| constexpr auto | convert_float (T value) -> convert_float_result< T > |
| template<bool C, typename T , typename F , FMT_ENABLE_IF(C) > | |
| auto | select (T true_value, F) -> T |
| template<typename Char , typename OutputIt > | |
| FMT_CONSTEXPR FMT_NOINLINE auto | fill (OutputIt it, size_t n, const basic_specs &specs) -> OutputIt |
| template<typename Char , align default_align = align::left, typename OutputIt , typename F > | |
| FMT_CONSTEXPR auto | write_padded (OutputIt out, const format_specs &specs, size_t size, size_t width, F &&f) -> OutputIt |
| template<typename Char , align default_align = align::left, typename OutputIt , typename F > | |
| constexpr auto | write_padded (OutputIt out, const format_specs &specs, size_t size, F &&f) -> OutputIt |
| template<typename Char , align default_align = align::left, typename OutputIt > | |
| FMT_CONSTEXPR auto | write_bytes (OutputIt out, string_view bytes, const format_specs &specs={}) -> OutputIt |
| template<typename Char , typename OutputIt , typename UIntPtr > | |
| auto | write_ptr (OutputIt out, UIntPtr value, const format_specs *specs) -> OutputIt |
| auto | needs_escape (uint32_t cp) -> bool |
| template<typename Char > | |
| auto | find_escape (const Char *begin, const Char *end) -> find_escape_result< Char > |
| auto | find_escape (const char *begin, const char *end) -> find_escape_result< char > |
| template<size_t width, typename Char , typename OutputIt > | |
| auto | write_codepoint (OutputIt out, char prefix, uint32_t cp) -> OutputIt |
| template<typename OutputIt , typename Char > | |
| auto | write_escaped_cp (OutputIt out, const find_escape_result< Char > &escape) -> OutputIt |
| template<typename Char , typename OutputIt > | |
| auto | write_escaped_string (OutputIt out, basic_string_view< Char > str) -> OutputIt |
| template<typename Char , typename OutputIt > | |
| auto | write_escaped_char (OutputIt out, Char v) -> OutputIt |
| template<typename Char , typename OutputIt > | |
| FMT_CONSTEXPR auto | write_char (OutputIt out, Char value, const format_specs &specs) -> OutputIt |
| FMT_CONSTEXPR void | prefix_append (unsigned &prefix, unsigned value) |
| template<typename OutputIt , typename UInt , typename Char > | |
| auto | write_int (OutputIt out, UInt value, unsigned prefix, const format_specs &specs, const digit_grouping< Char > &grouping) -> OutputIt |
| auto | write_loc (basic_appender< wchar_t > out, loc_value value, const format_specs &specs, locale_ref loc) -> bool |
| template<typename OutputIt > | |
| auto | write_loc (OutputIt, const loc_value &, const format_specs &, locale_ref) -> bool |
| template<typename T > | |
| FMT_CONSTEXPR auto | make_write_int_arg (T value, sign s) -> write_int_arg< uint32_or_64_or_128_t< T >> |
| template<typename Char , typename OutputIt , typename T > | |
| FMT_CONSTEXPR FMT_INLINE auto | write_int (OutputIt out, write_int_arg< T > arg, const format_specs &specs) -> OutputIt |
| template<typename Char , typename OutputIt , typename T > | |
| FMT_CONSTEXPR FMT_NOINLINE auto | write_int_noinline (OutputIt out, write_int_arg< T > arg, const format_specs &specs) -> OutputIt |
| template<typename Char , typename T , FMT_ENABLE_IF(is_integral< T >::value && !std::is_same< T, bool >::value && !std::is_same< T, Char >::value) > | |
| FMT_CONSTEXPR FMT_INLINE auto | write (basic_appender< Char > out, T value, const format_specs &specs, locale_ref loc) -> basic_appender< Char > |
| template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_integral< T >::value && !std::is_same< T, bool >::value && !std::is_same< T, Char >::value && !std::is_same< OutputIt, basic_appender< Char >>::value) > | |
| FMT_CONSTEXPR FMT_INLINE auto | write (OutputIt out, T value, const format_specs &specs, locale_ref loc) -> OutputIt |
| template<typename Char , typename OutputIt > | |
| FMT_CONSTEXPR auto | write (OutputIt out, Char value, const format_specs &specs, locale_ref loc={}) -> OutputIt |
| template<typename Char , typename OutputIt , FMT_ENABLE_IF(std::is_same< Char, char >::value) > | |
| FMT_CONSTEXPR auto | write (OutputIt out, basic_string_view< Char > s, const format_specs &specs) -> OutputIt |
| template<typename Char , typename OutputIt > | |
| FMT_CONSTEXPR auto | write (OutputIt out, basic_string_view< Char > s, const format_specs &specs, locale_ref) -> OutputIt |
| template<typename Char , typename OutputIt > | |
| FMT_CONSTEXPR auto | write (OutputIt out, const Char *s, const format_specs &specs, locale_ref) -> OutputIt |
| template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_integral< T >::value && !std::is_same< T, bool >::value && !std::is_same< T, Char >::value) > | |
| FMT_CONSTEXPR auto | write (OutputIt out, T value) -> OutputIt |
| template<typename Char > | |
| FMT_CONSTEXPR auto | parse_align (const Char *begin, const Char *end, format_specs &specs) -> const Char * |
| template<typename Char , typename OutputIt > | |
| FMT_CONSTEXPR20 auto | write_nonfinite (OutputIt out, bool isnan, format_specs specs, sign s) -> OutputIt |
| constexpr auto | get_significand_size (const big_decimal_fp &f) -> int |
| template<typename T > | |
| auto | get_significand_size (const dragonbox::decimal_fp< T > &f) -> int |
| template<typename Char , typename OutputIt > | |
| constexpr auto | write_significand (OutputIt out, const char *significand, int significand_size) -> OutputIt |
| template<typename Char , typename OutputIt , typename UInt > | |
| auto | write_significand (OutputIt out, UInt significand, int significand_size) -> OutputIt |
| template<typename Char , typename OutputIt , typename T , typename Grouping > | |
| FMT_CONSTEXPR20 auto | write_significand (OutputIt out, T significand, int significand_size, int exponent, const Grouping &grouping) -> OutputIt |
| template<typename Char , typename UInt , FMT_ENABLE_IF(std::is_integral< UInt >::value) > | |
| auto | write_significand (Char *out, UInt significand, int significand_size, int integral_size, Char decimal_point) -> Char * |
| template<typename OutputIt , typename UInt , typename Char , FMT_ENABLE_IF(!std::is_pointer< remove_cvref_t< OutputIt >>::value) > | |
| auto | write_significand (OutputIt out, UInt significand, int significand_size, int integral_size, Char decimal_point) -> OutputIt |
| template<typename OutputIt , typename Char > | |
| FMT_CONSTEXPR auto | write_significand (OutputIt out, const char *significand, int significand_size, int integral_size, Char decimal_point) -> OutputIt |
| template<typename OutputIt , typename Char , typename T , typename Grouping > | |
| FMT_CONSTEXPR20 auto | write_significand (OutputIt out, T significand, int significand_size, int integral_size, Char decimal_point, const Grouping &grouping) -> OutputIt |
| template<typename T > | |
| FMT_CONSTEVAL auto | exp_upper () -> int |
| constexpr auto | use_fixed (int exp, int exp_upper) -> bool |
| template<typename Char , typename Grouping , typename OutputIt , typename DecimalFP > | |
| FMT_CONSTEXPR20 auto | write_fixed (OutputIt out, const DecimalFP &f, int significand_size, Char decimal_point, const format_specs &specs, sign s, locale_ref loc={}) -> OutputIt |
| template<typename Char , typename Grouping , typename OutputIt , typename DecimalFP > | |
| FMT_CONSTEXPR20 auto | do_write_float (OutputIt out, const DecimalFP &f, const format_specs &specs, sign s, int exp_upper, locale_ref loc) -> OutputIt |
| template<typename Char , typename OutputIt , typename DecimalFP > | |
| FMT_CONSTEXPR20 auto | write_float (OutputIt out, const DecimalFP &f, const format_specs &specs, sign s, int exp_upper, locale_ref loc) -> OutputIt |
| template<typename T > | |
| constexpr auto | isnan (T value) -> bool |
| template<typename T , FMT_ENABLE_IF(is_floating_point< T >::value &&has_isfinite< T >::value) > | |
| FMT_CONSTEXPR20 auto | isfinite (T value) -> bool |
| template<typename T , FMT_ENABLE_IF(!has_isfinite< T >::value) > | |
| FMT_CONSTEXPR auto | isfinite (T value) -> bool |
| template<typename T , FMT_ENABLE_IF(is_floating_point< T >::value) > | |
| FMT_INLINE FMT_CONSTEXPR auto | signbit (T value) -> bool |
| FMT_CONSTEXPR20 void | adjust_precision (int &precision, int exp10) |
| FMT_CONSTEXPR20 void | format_dragon (basic_fp< uint128_t > value, unsigned flags, int num_digits, buffer< char > &buf, int &exp10) |
| template<typename Float , FMT_ENABLE_IF(!is_double_double< Float >::value) > | |
| FMT_CONSTEXPR20 void | format_hexfloat (Float value, format_specs specs, buffer< char > &buf) |
| constexpr auto | fractional_part_rounding_thresholds (int index) -> uint32_t |
| template<typename Float > | |
| FMT_CONSTEXPR20 auto | format_float (Float value, int precision, const format_specs &specs, bool binary32, buffer< char > &buf) -> int |
| template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_floating_point< T >::value) > | |
| FMT_CONSTEXPR20 auto | write (OutputIt out, T value, format_specs specs, locale_ref loc={}) -> OutputIt |
| template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_fast_float< T >::value) > | |
| FMT_CONSTEXPR20 auto | write (OutputIt out, T value) -> OutputIt |
| template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(is_floating_point< T >::value && !is_fast_float< T >::value) > | |
| auto | write (OutputIt out, T value) -> OutputIt |
| template<typename Char , typename OutputIt > | |
| auto | write (OutputIt out, monostate, format_specs={}, locale_ref={}) -> OutputIt |
| template<typename Char , typename OutputIt > | |
| FMT_CONSTEXPR auto | write (OutputIt out, basic_string_view< Char > value) -> OutputIt |
| template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(has_to_string_view< T >::value) > | |
| constexpr auto | write (OutputIt out, const T &value) -> OutputIt |
| template<typename Char , typename OutputIt , typename T , bool check = std::is_enum<T>::value && !std::is_same<T, Char>::value && mapped_type_constant<T, Char>::value != type::custom_type, FMT_ENABLE_IF(check) > | |
| FMT_CONSTEXPR auto | write (OutputIt out, T value) -> OutputIt |
| template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(std::is_same< T, bool >::value) > | |
| FMT_CONSTEXPR auto | write (OutputIt out, T value, const format_specs &specs={}, locale_ref={}) -> OutputIt |
| template<typename Char , typename OutputIt > | |
| FMT_CONSTEXPR auto | write (OutputIt out, Char value) -> OutputIt |
| template<typename Char , typename OutputIt > | |
| FMT_CONSTEXPR20 auto | write (OutputIt out, const Char *value) -> OutputIt |
| template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(std::is_same< T, void >::value) > | |
| auto | write (OutputIt out, const T *value, const format_specs &specs={}, locale_ref={}) -> OutputIt |
| template<typename Char , typename OutputIt , typename T , FMT_ENABLE_IF(mapped_type_constant< T, Char >::value== type::custom_type && !std::is_fundamental< T >::value) > | |
| FMT_CONSTEXPR auto | write (OutputIt out, const T &value) -> OutputIt |
| template<typename Context > | |
| FMT_CONSTEXPR void | handle_dynamic_spec (arg_id_kind kind, int &value, const arg_ref< typename Context::char_type > &ref, Context &ctx) |
| template<typename Char > | |
| void | write_buffer (std::basic_ostream< Char > &os, buffer< Char > &buf) |
| 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 T , typename Context , typename Char > | |
| void | convert_arg (basic_format_arg< Context > &arg, Char type) |
| template<typename Char > | |
| auto | make_arg_formatter (basic_appender< Char > iter, format_specs &s) -> arg_formatter< Char > |
| template<typename Char > | |
| void | parse_flags (format_specs &specs, const Char *&it, const Char *end) |
| template<typename Char , typename GetArg > | |
| auto | parse_header (const Char *&it, const Char *end, format_specs &specs, GetArg get_arg) -> int |
| auto | parse_printf_presentation_type (char c, type t, bool &upper) -> presentation_type |
| template<typename Char , typename Context > | |
| void | vprintf (buffer< Char > &buf, basic_string_view< Char > format, basic_format_args< Context > args) |
| template<typename T , size_t N> | |
| auto | range_begin (const T(&arr)[N]) -> const T * |
| template<typename T , size_t N> | |
| auto | range_end (const T(&arr)[N]) -> const T * |
| template<typename T > | |
| auto | range_begin (T &&rng) -> decltype(static_cast< T &&>(rng).begin()) |
| template<typename T > | |
| auto | range_end (T &&rng) -> decltype(static_cast< T &&>(rng).end()) |
| template<typename Tuple , typename F , size_t... Is> | |
| FMT_CONSTEXPR void | for_each (index_sequence< Is... >, Tuple &&t, F &&f) |
| template<typename Tuple , typename F > | |
| FMT_CONSTEXPR void | for_each (Tuple &&t, F &&f) |
| template<typename Tuple1 , typename Tuple2 , typename F , size_t... Is> | |
| void | for_each2 (index_sequence< Is... >, Tuple1 &&t1, Tuple2 &&t2, F &&f) |
| template<typename Tuple1 , typename Tuple2 , typename F > | |
| void | for_each2 (Tuple1 &&t1, Tuple2 &&t2, F &&f) |
| template<typename Formatter > | |
| FMT_CONSTEXPR auto | maybe_set_debug_format (Formatter &f, bool set) -> decltype(f.set_debug_format(set)) |
| template<typename Formatter > | |
| FMT_CONSTEXPR void | maybe_set_debug_format (Formatter &,...) |
| template<typename Char > | |
| void | vformat_to (buffer< Char > &buf, basic_string_view< Char > fmt, basic_format_args< buffered_context< Char >> args, locale_ref loc={}) |
| auto | is_whitespace (char c) -> bool |
| auto | to_hex_digit (char c) -> int |
| const char * | parse_scan_specs (const char *begin, const char *end, format_specs &specs, scan_type) |
| template<typename T , FMT_ENABLE_IF(std::is_unsigned< T >::value) > | |
| auto | read (scan_iterator it, T &value) -> scan_iterator |
| template<typename T , FMT_ENABLE_IF(std::is_unsigned< T >::value) > | |
| auto | read_hex (scan_iterator it, T &value) -> scan_iterator |
| template<typename T , FMT_ENABLE_IF(std::is_unsigned< T >::value) > | |
| auto | read (scan_iterator it, T &value, const format_specs &specs) -> scan_iterator |
| auto | read (scan_iterator it, double &value, const format_specs &={}) -> scan_iterator |
| auto | read (scan_iterator it, float &value, const format_specs &specs={}) -> scan_iterator |
| auto | read (scan_iterator it, std::string &value, const format_specs &={}) -> scan_iterator |
| auto | read (scan_iterator it, string_view &value, const format_specs &={}) -> scan_iterator |
| auto | read (scan_iterator it, monostate, const format_specs &={}) -> scan_iterator |
| void | vscan (detail::scan_buffer &buf, string_view fmt, scan_args args) |
| template<size_t I, typename... T, FMT_ENABLE_IF(I==sizeof...(T)) > | |
| void | make_args (std::array< scan_arg, sizeof...(T)> &, std::tuple< T... > &) |
Variables | |
| constexpr FMT_INLINE_VARIABLE uint32_t | invalid_code_point = ~uint32_t() |
| struct detail::fixed_string | deallocate |
Converts a string literal into a format string that will be parsed at compile time and converted into efficient formatting code.
Requires support for class types in constant template parameters (a C++20 feature).
Example:
// Converts 42 into std::string using the most efficient method and no // runtime format string processing. using namespace fmt::literals; std::string s = fmt::format("{}"_cf, 42);
1.8.13