diff --git a/include/fmt/core.h b/include/fmt/core.h index 6290936de428..607ad3224e1d 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -2860,10 +2860,9 @@ struct formatter FMT_CONSTEXPR auto parse(ParseContext& ctx) -> const Char* { - auto begin = ctx.begin(), end = ctx.end(); - if (begin == end) return begin; auto type = detail::type_constant::value; - begin = detail::parse_format_specs(begin, end, specs_, ctx, type); + auto end = + detail::parse_format_specs(ctx.begin(), ctx.end(), specs_, ctx, type); auto eh = detail::error_handler(); switch (type) { case detail::type::none_type: @@ -2916,7 +2915,7 @@ struct formatter::value,