We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36507ba commit b64e714Copy full SHA for b64e714
substrate/flags
@@ -61,6 +61,13 @@ namespace substrate
61
return (value & bits) == bits;
62
}
63
64
+ template<typename... values_t, typename = std::enable_if_t<(std::is_same_v<values_t, enum_t> && ...)>>
65
+ [[nodiscard]] constexpr bool excludes(const values_t ...flags) const noexcept
66
+ {
67
+ const storage_t bits{storage_t((flagAsBit(flags) | ...))};
68
+ return (value & bits) == 0U;
69
+ }
70
+
71
template<typename... values_t, typename = std::enable_if_t<(std::is_same_v<values_t, enum_t> && ...)>>
72
[[nodiscard]] constexpr bitFlags_t without(const values_t ...flags) const noexcept
73
{
0 commit comments