constexpr functions used internally.
This file implements a few compile-time checks to verify the implementation is correct.