Improve compile-time checks

This commit is contained in:
Victor Zverovich
2022-06-05 13:58:04 -07:00
parent d02c582b96
commit 4bb3af7a6b
2 changed files with 64 additions and 40 deletions
+2 -1
View File
@@ -337,7 +337,8 @@ template <typename T, typename Char>
constexpr parse_specs_result<T, Char> parse_specs(basic_string_view<Char> str,
size_t pos, int next_arg_id) {
str.remove_prefix(pos);
auto ctx = basic_format_parse_context<Char>(str, {}, next_arg_id);
auto ctx =
compile_parse_context<Char>(str, max_value<int>(), {}, next_arg_id);
auto f = formatter<T, Char>();
auto end = f.parse(ctx);
return {f, pos + fmt::detail::to_unsigned(end - str.data()) + 1,