flags: Allow flag to set conversion
We can allow a single flag to shortcut and convert into a set.
Change-Id: I8a466ee77739161ccc6554c5bbe01af2e58ab339
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/include/stdplus/flags.hpp b/include/stdplus/flags.hpp
index faa3a2f..d0e091a 100644
--- a/include/stdplus/flags.hpp
+++ b/include/stdplus/flags.hpp
@@ -16,6 +16,7 @@
using underlying = I;
constexpr BitFlags() noexcept : val(0) {}
+ constexpr BitFlags(type t) noexcept : val(std::to_underlying(t)) {}
explicit constexpr BitFlags(underlying val) noexcept : val(val) {}
constexpr BitFlags& set(type flag) & noexcept