mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-02 11:54:27 +02:00
fix: account for an empty string in VS2022
This commit is contained in:
@@ -427,6 +427,7 @@ public:
|
|||||||
[[nodiscard]] constexpr auto parse(STD_FMT::basic_format_parse_context<CharT>& ctx)
|
[[nodiscard]] constexpr auto parse(STD_FMT::basic_format_parse_context<CharT>& ctx)
|
||||||
{
|
{
|
||||||
auto range = do_parse(ctx);
|
auto range = do_parse(ctx);
|
||||||
|
if(range.first != range.second)
|
||||||
format_str = std::basic_string_view<CharT>(&*range.first, static_cast<size_t>(range.second - range.first));
|
format_str = std::basic_string_view<CharT>(&*range.first, static_cast<size_t>(range.second - range.first));
|
||||||
return range.second;
|
return range.second;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user