August 2020
Beginner to intermediate
653 pages
16h 55m
English
This Exploration begins a series of Explorations that cover more advanced topics in the C++ type system. The series kicks off with an examination of how to work with individual bits. This Exploration begins with operators that manipulate integers at the bit level, then introduces bitfields—a completely different way of working with bits. The final topic is the bitset class template, which lets you work with bitsets of any size.
A common idiom in computer programming is to treat an integer as a bitmask. The bits can represent a set of small integers, such that a value n is ...