Commit be0e2684 authored by Victor Zverovich's avatar Victor Zverovich

Optimize processing of trailing '}'

parent fbc38b90
...@@ -2148,7 +2148,8 @@ FMT_CONSTEXPR void parse_format_string( ...@@ -2148,7 +2148,8 @@ FMT_CONSTEXPR void parse_format_string(
// 2.5x faster than the naive one-pass implementation on long format strings. // 2.5x faster than the naive one-pass implementation on long format strings.
auto p = find<IS_CONSTEXPR>(begin, end, '{'); auto p = find<IS_CONSTEXPR>(begin, end, '{');
if (p == end) { if (p == end) {
write(begin, end); if (begin != end)
write(begin, end);
return; return;
} }
write(begin, p); write(begin, p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment