formatter:
template<>
struct std::formatter<Type> {
constexpr auto parse(std::format_parse_context& context) {
return context.begin();
}
auto format(const Type& sVal, std::format_context& context) const {
return std::format_to(context.out(), "{}", Type.getValue());
}
};via delegation:
template<>
struct std::formatter<T> {
std::formatter<int> formatter;
constexpr auto parse(std::format_parse_context& context) {
return formatter.parse(context);
}
auto format(const SingleValue& singleValue, std::format_context& context) const {
return formatter.format(singleValue.getValue(), context);
}
};