/bitmanip

Single-header C++ library for bit manipulation.

Primary LanguageC++MIT LicenseMIT

Bit Manipulation

This is a single-header C++17 library for manipulating bits.

It implements many of Sean Eron Anderson's Bit Twiddling Hacks and adds some more unique ones on top of that.

Most of the implementations are templated and designed for any integer type. All of the implementations are constexpr.

Configuration

You will find a USER CONFIGURATION section at the top of the header file. Uncomment #define lines in this section to customize this library to your own needs.

License

See the LICENSE file.