This repo provides a C++11/14/17 equivalent for C++20s <bit> header.
It aims for complete interface equivalence while still being performant, using builtin bitwise operations where available, and fallback slow implementations where not.
For testing and installing:
- Meson
sudo apt install meson
[[nodiscard]] is only supported in C++17
constexpr functions are only supported in C++14
Include bit.hh
and use bit::
namespace instead of std::
namespace
test.sh