<bitset>
The <bitset>
header declares a single class template, bitset
, and some related functions. A bitset
is a fixed-size sequence of bits. The
bitwise operators (&
, |
, ^
, etc.)
are overloaded to work with bitset
s
in the usual manner, and you can refer to individual bits by
index.
The Boost project has a class template for a bit sequence that can change size at runtime. See Appendix B for information about Boost.
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.