std::formatterstd::queue - cppreference.com (original) (raw)
| | | | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ------------- | | template< class CharT, class T, std::formattable<CharT> Container, class... U > struct formatter<std::queue<T, Container, U...>, CharT>; | | (since C++23) |
The template specialization of std::formatter for the container adaptor type std::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.
Contents
- 1 Member types
- 2 Data members
- 3 Member functions
- 4 std::formatterstd::queue::parse
- 5 std::formatterstd::queue::format
[edit] Member types
| Name | Definition |
|---|---|
| maybe-const-container | fmt-maybe-const <Container, CharT>(exposition-only member type*) |
| maybe-const-adaptor | maybe-const < std::is_const_v<_maybe-const-container_>, std::queue<T, Container, U...>>(exposition-only member type*) |
[edit] Data members
| Name | Definition |
|---|---|
| underlying_ | underlying formatter of type std::formatter<ranges::ref_view<_maybe-const-container_>, CharT>(exposition-only member object*) |
[edit] Member functions
| | parses the format specifier as specified by range-format-spec (public member function) | | ----------------------------------------------------------------------------------------------- | | | writes the range formatted output as specified by range-format-spec (public member function) |
std::formatterstd::queue::parse
| template< class ParseContext > constexpr auto parse( ParseContext& ctx ) -> ParseContext::iterator; | | | | ------------------------------------------------------------------------------------------------------ | | |
Equivalent to return _[underlying](formatter.html#underlying)_ .parse(ctx);.
Return value
An iterator past the end of the range-format-spec of the underlying container.
std::formatterstd::queue::format
| template< class FormatContext > auto format( /*maybe-const-adaptor*/& r, FormatContext& ctx ) const -> FormatContext::iterator; | | | | ------------------------------------------------------------------------------------------------------------------------------------ | | |
Equivalent to return _[underlying](formatter.html#underlying)_ .format(r.c, ctx);.
Return value
An iterator past the end of the output range.