In CPP Reference it is stated that:
std::byte
is a distinct type that implements the concept of byte as specified in the C++ language definition.Like char and unsigned char, it can be used to access raw memory occupied by other objects (object representation), but unlike those types, it is not a character type and is not an arithmetic type. A byte is only a collection of bits, and only bitwise operators are defined for it.
But that's not true: since it is an enumeration type, the compare operations (<
, <=
, >
, >=
, ==
, !=
) are also possible.
Is this intentional, e.g. to use std::byte
also as a key for std::map
, etc.?