Overview
Umbrella header that pulls in every Castle bit-manipulation component. Use it when one translation unit needs several bit helpers and a single include is more convenient than selecting individual headers.
Dependencies
bit_corebit_countbit_maskbit_mathbit_reversebit_rotatebit_utilsflags
Public API
| Signature | Description |
|---|---|
#include "castle/bit/bit.hpp" | Includes the complete public API from the eight bit component headers listed above. No additional declarations are introduced by this umbrella header. |
Usage example
See samples/sample_bit.cpp for a complete example.
#include "castle/bit/bit.hpp"
uint8_t value = 0;
value = castle::bit::set(value, 3U);
const uint8_t rotated = castle::bit::rotate_left(value, 1U);
castle::bit::flags<uint8_t, 0x0FU> status(rotated);Constraints & notes
- Header-only and allocation-free.
- Behavior comes entirely from the included component headers.
- Prefer the narrower component header when include surface matters more than convenience.