fix: account for an empty string in VS2022

This commit is contained in:
Mateusz Pusz
2021-11-16 10:51:04 +01:00
parent f6250d69e1
commit 163a2502ad

View File

@@ -427,7 +427,8 @@ public:
[[nodiscard]] constexpr auto parse(STD_FMT::basic_format_parse_context<CharT>& ctx)
{
auto range = do_parse(ctx);
format_str = std::basic_string_view<CharT>(&*range.first, static_cast<size_t>(range.second - range.first));
if(range.first != range.second)
format_str = std::basic_string_view<CharT>(&*range.first, static_cast<size_t>(range.second - range.first));
return range.second;
}