summaryrefslogtreecommitdiff
path: root/src/flag_set.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/flag_set.hpp')
-rw-r--r--src/flag_set.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/flag_set.hpp b/src/flag_set.hpp
index aa90a217..490f0daf 100644
--- a/src/flag_set.hpp
+++ b/src/flag_set.hpp
@@ -92,11 +92,21 @@ public:
return m_data[i];
}
- constexpr operator bool() const
+ explicit constexpr operator bool() const
{
return !empty();
}
+ constexpr bool operator == (flag_set const &other) const
+ {
+ return m_data == other.m_data;
+ }
+
+ constexpr bool operator != (flag_set const &other) const
+ {
+ return !(*this == other);
+ }
+
constexpr bool bit(std::size_t i) const
{
assert(i < nbits);