From 6ff1831200a7a8030a573a25470efdfb4da20ef1 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Mon, 14 Feb 2022 11:12:38 +0200 Subject: [PATCH] utils: make MU_ENABLE_BITOPS more constexpr --- lib/utils/mu-utils.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/mu-utils.hh b/lib/utils/mu-utils.hh index d1ed7e59..b5eb3b50 100644 --- a/lib/utils/mu-utils.hh +++ b/lib/utils/mu-utils.hh @@ -304,8 +304,8 @@ private: constexpr ET operator~(ET e) { return MU_TO_ENUM(ET, ~(MU_TO_NUM(ET, e))); } \ constexpr bool any_of(ET e) { return MU_TO_NUM(ET, e) != 0; } \ constexpr bool none_of(ET e) { return MU_TO_NUM(ET, e) == 0; } \ - static inline ET& operator&=(ET& e1, ET e2) { return e1 = e1 & e2; } \ - static inline ET& operator|=(ET& e1, ET e2) { return e1 = e1 | e2; } + constexpr ET& operator&=(ET& e1, ET e2) { return e1 = e1 & e2; } \ + constexpr ET& operator|=(ET& e1, ET e2) { return e1 = e1 | e2; } /** * For unit tests, assert two std::string's are equal.