Bit manipulation (since C++20) - cppreference.com (original) (raw)
Provides several function templates to access, manipulate, and process individual bits and bit sequences.
| Defined in header |
|---|
| Defined in namespace std |
| Integral powers of 2 |
| Rotating |
| Counting |
| Endian |
[edit] Notes
| Feature-test macro | Value | Std | Feature |
|---|---|---|---|
| __cpp_lib_bit_cast | 201806L | (C++20) | std::bit_cast |
| __cpp_lib_bitops | 201907L | (C++20) | Bit operations |
| __cpp_lib_int_pow2 | 202002L | (C++20) | Integral power-of-2 operations |
| __cpp_lib_byteswap | 202110L | (C++23) | std::byteswap |