8template <
class T,
class Allocator>
9struct fmt::formatter<
std::
vector<T, Allocator>> : formatter<string_view> {
11 template <
typename FormatContext>
12 auto format(
const std::vector<T, Allocator> &v, FormatContext &ctx)
const
14 return fmt::format_to(ctx.out(),
"[{}]", fmt::join(v,
", "));
18template <
class T,
class Allocator>
19struct fmt::formatter<
std::deque<T, Allocator>> : formatter<string_view> {
21 template <
typename FormatContext>
22 auto format(
const std::deque<T, Allocator> &v, FormatContext &ctx)
const
24 return fmt::format_to(ctx.out(),
"[{}]", fmt::join(v,
", "));
28template <
class T, std::
size_t n>
29struct fmt::formatter<
std::array<T, n>> : formatter<string_view> {
31 template <
typename FormatContext>
32 auto format(
const std::array<T, n> &v, FormatContext &ctx)
const
34 return fmt::format_to(ctx.out(),
"[{}]", fmt::join(v,
", "));
38template <
class T,
class Compare,
class Allocator>
39struct fmt::formatter<
std::set<T, Compare, Allocator>> : formatter<string_view> {
41 template <
typename FormatContext>
42 auto format(
const std::set<T, Compare, Allocator> &s, FormatContext &ctx)
const
44 return fmt::format_to(ctx.out(),
"{{{}}}", fmt::join(s,
", "));
48template <
class T,
class Compare,
class Allocator>
49struct fmt::formatter<
std::map<T, Compare, Allocator>> : formatter<string_view> {
51 template <
typename FormatContext>
52 auto format(
const std::map<T, Compare, Allocator> &s, FormatContext &ctx)
const
54 return fmt::format_to(ctx.out(),
"({})", fmt::join(s,
", "));
58template <
class F,
class S>
59struct fmt::formatter<
std::pair<F, S>> : formatter<string_view> {
61 template <
typename FormatContext>
62 auto format(
const std::pair<F, S> &p, FormatContext &ctx)
const
64 return fmt::format_to(ctx.out(),
"({}, {})", p.first, p.second);