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.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/flag_set.hpp b/src/flag_set.hpp
index 737513d5..7960de42 100644
--- a/src/flag_set.hpp
+++ b/src/flag_set.hpp
@@ -50,6 +50,14 @@ public:
return f;
}
+ static constexpr flag_set make_bit(std::size_t ibit)
+ {
+ assert(ibit < nbits);
+ flag_set f;
+ f.m_data[ibit / 32] = (1UL << (ibit % 32));
+ return f;
+ }
+
constexpr std::size_t size() const
{
return tiers;