Bit Manipulation
Learn how to manipulate bits with the '<bit>' header.
We'll cover the following
The header <bit>
supports functions to access and manipulate individual bits or bit sequences.
std::endian
Thanks to the new type std::endian
, you get the endianness of a scalar type. Endianness can be big-endian or little-endian. Big-endian means that the most significant byte is the furthest left. Little-endian means that the least significant byte is furthest left. A scalar type is either an arithmetic type, an enum
, a pointer, a member pointer, or a std::nullptr_t
. The class endian
provides the endianness of all scalar types:
Get hands-on with 1400+ tech skills courses.