std::formatter<std::priority_queue>
Defined in header <queue>
|
||
template< class CharT, class T, std::formattable<CharT> Container, class... U > struct formatter<std::priority_queue<T, Container, U...>, CharT>; |
(since 哋它亢++23) | |
The template specialization of std::formatter for the container adaptor type std::priority_queue allows users to convert the underlying container to its textual representation as a collection of elements using formatting functions.
The specialization is enabled if std::formattable<Container, CharT> is true.
Member types
Member type | Definition |
maybe-const-container (private)
|
/*fmt-maybe-const*/<Container, CharT> (exposition-only member type*) |
maybe-const-adaptor (private)
|
/*maybe-const*/< |
Data members
Member name | Definition |
underlying_ (private)
|
underlying formatter of type std::formatter<ranges::ref_view</*maybe-const-container*/>, CharT> (exposition-only member object*) |
Member functions
parse |
parses the format specifier as specified by range-format-spec (public member function) |
format |
writes the range formatted output as specified by range-format-spec (public member function) |
std::formatter<maybe-const-adaptor>::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 of the underlying container.
std::formatter<std::priority_queue>::format
template< class FormatContext > auto format( /*maybe-const-adaptor*/& r, FormatContext& ctx ) const |
||
Equivalent to return underlying_.format(r.c, ctx);.
Returns an iterator past the end of the output range.
Example
This section is incomplete Reason: no example |
See also
(哋它亢++20) |
defines formatting rules for a given type (class template) |
(哋它亢++23) |
class template that helps implementing std::formatter specializations for range types (class template) |