diff --git a/include/fmt/format.h b/include/fmt/format.h index f73e8053..123a9e26 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3181,6 +3181,11 @@ typename Context::iterator vformat_to( basic_format_args args, detail::locale_ref loc = detail::locale_ref()) { format_handler h(out, format_str, args, loc); + if (format_str.size() == 2 && format_str[0] == '{' && format_str[1] == '}') { + auto arg = detail::get_arg(h.context, 0); + h.parse_context.advance_to(&format_str[1]); + return visit_format_arg(ArgFormatter(h.context, &h.parse_context), arg); + } detail::parse_format_string(format_str, h); return h.context.out(); }