std::range-...t-formatter(3)
π std::range-...t-formatter(3) π
okay so bestie, welcome to this page in the C++ Standard Libary manual (yes, the header spells it βLibaryβ π, weβre keeping it). The title up top is std::range-...t-formatter(3), and the NAME is literally std::range-default-formatter twice. Slay, letβs go. β¨
πΈ NAME πΈ
std::range-default-formatter β std::range-default-formatter. Thatβs the whole name, no cap: both sides match, and we move on. π
π¦ Synopsis π¦
Defined in header <format>:
template< ranges::input_range R, class CharT >
(since C++23)
struct range-default-formatter<range_format::sequence, R,
(exposition only*)
CharT>;
The class template range-default-formatter for range types is specialized for formatting range as a sequence of elements if std::format_kind<R> is std::range_format::sequence. π
π Member types π
maybe-const-r(private) β definition:/*fmt-maybe-const*/<R, CharT>; this is an(exposition-only member type*). π
π§ Member objects π§
underlying_(private) β the underlying formatter of typestd::range_formatter<std::remove_cvref_t<ranges::range_reference_t<maybe-const-r>>, CharT>; this is an(exposition-only member object*). π«Ά
π Member functions π
- constructor (implicitly declared) β constructs a
range-default-formatter; public member function. β¨ set_separatorβ sets a specified separator for the range formatted result; public member function. πset_bracketsβ sets a specified opening and closing brackets for the range formatted result; public member function. πparseβ parses the format specifier as specified byrange-format-spec; public member function. π¦formatβ writes the range formatted output as specified byrange-format-spec; public member function. π₯
β¨ std::range-default-formatter<std::range_format::sequence>::set_separator β¨
constexpr void set_separator( std::basic_string_view<CharT> sep ) noexcept;
Equivalent to a call to underlying_.set_separator(sep). π
π¦ std::range-default-formatter<std::range_format::sequence>::set_brackets π¦
constexpr void set_brackets( std::basic_string_view<CharT> opening,
std::basic_string_view<CharT> closing )
noexcept;
Equivalent to a call to underlying_.set_brackets(opening, closing). β¨
πΈ std::range-default-formatter<std::range_format::sequence>::parse πΈ
template< class ParseContext >
constexpr auto parse( ParseContext& ctx ) -> ParseContext::iterator;
Equivalent to return underlying_.parse(ctx);.
Returns an iterator past the end of the range-format-spec. π
π₯ std::range-default-formatter<std::range_format::sequence>::format π₯
template< class FormatContext >
auto format( maybe-const-r& elems, FormatContext& ctx ) const ->
FormatContext::iterator;
Equivalent to return underlying_.format(elems, ctx);.
Returns an iterator past the end of the output range. π
π See also π
formatter(C++20) β defines formatting rules for a given type; class template. πrange_formatter(C++23) β class template that helps implementingstd::formatterspecializations for range types; class template. π¦
okay bestie thatβs the whole page β mwah π. Source/version and date from the footer: http://cppreference.com, 2024.06.10; page title std::range-...t-formatter(3). π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms