For each of
queue,
priority_queue, and
stack,
the library provides the following formatter specialization
where
adaptor-type is the name of the template:
namespace std {
template<class charT, class T, formattable<charT> Container, class... U>
struct formatter<adaptor-type<T, Container, U...>, charT> {
private:
using maybe-const-container =
fmt-maybe-const<Container, charT>;
using maybe-const-adaptor =
maybe-const<is_const_v<maybe-const-container>,
adaptor-type<T, Container, U...>>;
formatter<ranges::ref_view<maybe-const-container>, charT> underlying_;
public:
template<class ParseContext>
constexpr typename ParseContext::iterator
parse(ParseContext& ctx);
template<class FormatContext>
typename FormatContext::iterator
format(maybe-const-adaptor& r, FormatContext& ctx) const;
};
}