(C++17) | ||||
| Sequence | ||||
(C++11) | ||||
(C++26) | ||||
(C++26) | ||||
(C++11) | ||||
| Associative | ||||
| Unordered associative | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
| Adaptors | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
| Views | ||||
(C++20) | ||||
(C++23) | ||||
| Tables | ||||
| Iterator invalidation | ||||
| Member function table | ||||
| Non-member function table |
std::stack| Member functions | ||||
| Element access | ||||
| Capacity | ||||
| Modifiers | ||||
(C++23) | ||||
(C++11) | ||||
(C++11) | ||||
| Non-member functions | ||||
(C++11) | ||||
| Helper classes | ||||
(C++11) | ||||
formatter<std::stack> (C++23) | ||||
| Deduction guides(C++17) |
Defined in header <stack> | ||
template<class CharT,class T,std::formattable<CharT> Container,class...U> struct formatter<std::stack<T, Container, U...>, CharT>; | (since C++23) | |
The template specialization ofstd::formatter for the container adaptor typestd::stack allows users to convert the underlying container to its textual representation as a collection of elements usingformatting functions.
The specialization is enabled ifstd::formattable<Container, CharT> istrue.
Contents |
| 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::stack<T, Container, U...>>(exposition-only member type*) |
| Name | Definition |
underlying_ | underlying formatter of typestd::formatter<ranges::ref_view<maybe-const-container>, CharT>(exposition-only member object*) |
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) |
template<class ParseContext> constexprauto parse( ParseContext& ctx)-> ParseContext::iterator; | ||
Equivalent toreturn underlying_ .parse(ctx);.
An iterator past the end of therange-format-spec of the underlying container.
template<class FormatContext> auto format(/*maybe-const-adaptor*/& r, FormatContext& ctx)const | ||
Equivalent toreturn underlying_ .format(r.c, ctx);.
An iterator past the end of the output range.
| This section is incomplete Reason: no 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] |