Simplify format string parsing

This commit is contained in:
Victor Zverovich
2022-12-25 12:31:38 -08:00
parent b8f36207c9
commit bd12aaa98e
4 changed files with 38 additions and 47 deletions

View File

@ -518,11 +518,10 @@ template <class charT> struct formatter<std::complex<double>, charT> {
public:
FMT_CONSTEXPR typename basic_format_parse_context<charT>::iterator parse(
basic_format_parse_context<charT>& ctx) {
auto result = parse_format_specs(ctx.begin(), ctx.end(), ctx,
detail::type::string_type);
specs_ = result.specs;
auto end = parse_format_specs(ctx.begin(), ctx.end(), specs_, ctx,
detail::type::string_type);
detail::parse_float_type_spec(specs_, detail::error_handler());
return result.end;
return end;
}
template <class FormatContext>