Localization library | |||||||||||||||||||||||||
Regular expressions library(C++11) | |||||||||||||||||||||||||
Formatting library(C++20) | |||||||||||||||||||||||||
Null-terminated sequence utilities | |||||||||||||||||||||||||
Byte strings | |||||||||||||||||||||||||
Multibyte strings | |||||||||||||||||||||||||
Wide strings | |||||||||||||||||||||||||
Primitive numeric conversions | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Text encoding identifications | |||||||||||||||||||||||||
|
Standard format specification | ||||
Formatting functions | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
Format strings | ||||
(C++20)(C++20)(C++20) | ||||
(C++26) | ||||
Formatting concepts | ||||
(C++23) | ||||
Formatter | ||||
(C++20) | ||||
(C++23) | ||||
formatter<range> (C++23) | ||||
(C++23) | ||||
(C++20)(C++20)(C++20) | ||||
(C++20)(C++20)(C++20) | ||||
(C++23) | ||||
(C++23) | ||||
Formatting arguments | ||||
(C++20) | ||||
(C++20) | ||||
(C++20)(C++20)(C++20) | ||||
(C++20)(deprecated in C++26) | ||||
(C++20)(C++20) | ||||
Format error | ||||
(C++20) |
Defined in header <format> | ||
template<ranges::input_range R,class CharT> requires(std::format_kind<R>!= std::range_format::disabled)&& | (since C++23) | |
Helper templates | ||
template<std::range_format K,ranges::input_range R,class CharT> struct/*range-default-formatter*/; | (exposition only*) | |
The template specialization ofstd::formatter for the range types allows users to convert a range to its textual representation as a collection of elements or a string usingformatting functions.
The specialization is derived fromrange-default-formatter
<std::format_kind<R>, R, CharT>.
The specialization is enabled ifR
satisfiesinput_range
,std::format_kind<R> is notstd::range_format::disabled, andstd::formattable<ranges::range_reference_t<R>, CharT> istrue.
This specialization meets theFormatter requirements ifconst R modelsinput_range
andranges::range_reference_t<const R> modelsstd::formattable<CharT>. It always meets theBasicFormatter requirements.
Contents |
The syntax ofrange-format-spec is:
range-fill-and-align (optional)width (optional)n (optional)range-type (optional)range-underlying-spec (optional) | |||||||||
The syntax is fully described inrange format specification.
For specializations ofstd::formatter
wherestd::format_kind<R> is eitherstd::range_format::string orstd::range_format::debug_string, theformat-spec isstd-format-spec instead ofrange-format-spec (which usesstd::formatter<std::basic_string<CharT>, CharT> as the underlying formatter).
range-default-formatter
formatting utility for ranges in sequence form (class template specialization)[edit] | |
formatting utility for ranges in map form (class template specialization)[edit] | |
formatting utility for ranges in set form (class template specialization)[edit] | |
formatting utility for ranges in string or escaped string form (class template specialization)[edit] |
This section is incomplete Reason: example |
(C++20) | defines formatting rules for a given type (class template)[edit] |
(C++23) | class template that helps implementingstd::formatter specializations for range types (class template)[edit] |