Template Struct FormatterDelegator

Struct Documentation

template<typename T>
struct FormatterDelegator

A reusable base class for formatters that delegate their format specifier (like :.2f) to an underlying type.

Public Functions

inline constexpr auto parse(fmt::format_parse_context &ctx)
template<typename FormatContext, typename ...Args>
inline auto format_elements(FormatContext &ctx, const char *sep, const Args&... args) const

Helper to cleanly format multiple elements using the parsed specifier. Eliminates repetitive iterator updating.

Public Members

fmt::formatter<T> underlying
bool has_custom_spec = false