15 requires std::derived_from<T, tagval::detail::TagValBaseTag>
16struct std::formatter<T, char> {
17 static constexpr auto parse(
const std::format_parse_context& ctx) {
18 const auto* it = ctx.begin();
19 if (it != ctx.end() && *it !=
'}') {
20 throw std::format_error{
"tagval: only the default format spec is supported"};
25 template <
typename FormatContext>
26 auto format(
const T& v, FormatContext& ctx)
const {
27 const auto code = v.code();
28 return std::ranges::copy(code, ctx.out()).out;
CRTP HandleBase used by ClosedEnded and OpenEnded.