Skip to content

Commit

Permalink
Merge branch 'Neargye:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jaepil authored Jul 21, 2024
2 parents 25f3685 + 9a9308f commit 6654311
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/magic_enum/magic_enum_containers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,14 +621,14 @@ class bitset {
constexpr explicit bitset(string_view sv, Cmp&& cmp = {}, char_type sep = static_cast<char_type>('|')) {
for (std::size_t to = 0; (to = magic_enum::detail::find(sv, sep)) != string_view::npos; sv.remove_prefix(to + 1)) {
if (auto v = enum_cast<E>(sv.substr(0, to), cmp)) {
set(v);
set(*v);
} else {
MAGIC_ENUM_THROW(std::invalid_argument("magic_enum::containers::bitset::constructor: Unrecognized enum value in string"));
}
}
if (!sv.empty()) {
if (auto v = enum_cast<E>(sv, cmp)) {
set(v);
set(*v);
} else {
MAGIC_ENUM_THROW(std::invalid_argument("magic_enum::containers::bitset::constructor: Unrecognized enum value in string"));
}
Expand Down

0 comments on commit 6654311

Please sign in to comment.