From 739b600f402c905307e6d196daa62b423d331d9f Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 30 Dec 2022 12:21:32 -0800 Subject: [PATCH] Remove iterator shenanigans --- include/fmt/format.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 6336599292d8..0da5607aef6e 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -4148,8 +4148,7 @@ void vformat_to(buffer& buf, basic_string_view fmt, -> const Char* { auto arg = get_arg(context, id); if (arg.type() == type::custom_type) { - parse_context.advance_to(parse_context.begin() + - (begin - &*parse_context.begin())); + parse_context.advance_to(begin); visit_format_arg(custom_formatter{parse_context, context}, arg); return parse_context.begin(); }