Bit manipulation (since C++20)
From cppreference.com
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Utilities library
Relational operators (deprecated in C++20)
Integer comparison functions
Swap and type operations
Common vocabulary types
Type support (basic types, RTTI)
Library feature-test macros (C++20)
(C++11)
(C++20)
(C++26)
(C++20)
Coroutine support (C++20)
Contract support (C++26)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)(C++20)
(C++20)(C++20)(C++20)
General utilities
(C++20)(C++20)(C++20)
(C++20)(C++20)(C++20)
(C++20)
Bit manipulation
(C++20)
(C++23)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
Provides several function templates to access, manipulate, and process individual bits and bit sequences.
Defined in header
<bit>
Defined in namespace
std
(C++20)
(function template) [edit]
Integral powers of 2
(C++20)
(function template) [edit]
(C++20)
(function template) [edit]
(C++20)
(function template) [edit]
(C++20)
(function template) [edit]
Rotating
(C++20)
(function template) [edit]
(C++20)
(function template) [edit]
Counting
(C++20)
(function template) [edit]
(C++20)
(function template) [edit]
(C++20)
(function template) [edit]
(C++20)
(function template) [edit]
(C++20)
(function template) [edit]
Endian
(C++20)
(enum) [edit]
[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 |
[edit] See also
C documentation for Bit manipulation