From f8c09bcdf5692970f793255e74ec536841d9dca3 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Sun, 1 Sep 2024 12:33:04 +0200 Subject: [PATCH] Review. --- include/deal.II/base/patterns.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/deal.II/base/patterns.h b/include/deal.II/base/patterns.h index f906cea13b..4ccb8de0a7 100644 --- a/include/deal.II/base/patterns.h +++ b/include/deal.II/base/patterns.h @@ -2415,11 +2415,10 @@ namespace Patterns to_string(const T &value, const Patterns::PatternBase &p = *Convert::to_pattern()) { - namespace B = magic_enum::bitwise_operators; const auto values = magic_enum::enum_values(); std::vector names; for (const auto &v : values) - if (B::operator&(value, v) == v) + if (magic_enum::bitwise_operators::operator&(value, v) == v) names.push_back(std::string(magic_enum::enum_name(v))); return Patterns::Tools::Convert::to_string(names, p); } @@ -2428,7 +2427,6 @@ namespace Patterns to_value(const std::string &s, const dealii::Patterns::PatternBase &p = *to_pattern()) { - namespace B = magic_enum::bitwise_operators; // Make sure we have a valid enum value, or empty value AssertThrow(p.match(s), ExcNoMatch(s, p.description())); T value = T(); @@ -2439,7 +2437,8 @@ namespace Patterns { auto v = magic_enum::enum_cast(name); if (v.has_value()) - value = B::operator|(value, v.value()); + value = + magic_enum::bitwise_operators::operator|(value, v.value()); } return value; } -- 2.39.5