Call parse on empty specs at compile time

This commit is contained in:
Victor Zverovich
2023-07-13 17:17:00 -07:00
parent 8e87d3a8be
commit 661b23edeb
3 changed files with 13 additions and 11 deletions

View File

@@ -2627,7 +2627,9 @@ template <typename Char, typename... Args> class format_string_checker {
#endif
}
FMT_CONSTEXPR void on_replacement_field(int, const Char*) {}
FMT_CONSTEXPR void on_replacement_field(int id, const Char* begin) {
on_format_specs(id, begin, begin); // Call parse() on empty specs.
}
FMT_CONSTEXPR auto on_format_specs(int id, const Char* begin, const Char*)
-> const Char* {