Since std::byte
by definition it is not an integral type, the following fragment is poorly formed:
enum class foo : std::byte
{
bar = 1,
baz = 2
};
Is there a way in C ++ 17 to do something equivalent to this?
Edit: I am not trying to solve any specific problem. Obviously, that enum class whatever : unsigned char
will do it. However, I expected it to std::byte
be a little more flexible and would like to know if this is possible at all.
source
share