The <bit> header from C++20's standard library. More...
Namespaces | |
namespace | std |
SeqAn specific customisations in the standard namespace. | |
Macros | |
#define | SEQAN3_CPP_LIB_BITOPS IMPLEMENTATION_DEFINED |
A workaround for __cpp_lib_bitops for gcc version 9.x (in C++20 mode). Those versions implemented std::countl_zero, etc, but did not define that feature detection macro. | |
#define | SEQAN3_CPP_LIB_ENDIAN IMPLEMENTATION_DEFINED |
A workaround for __cpp_lib_endian for gcc version 8.x (in C++20 mode). Those versions implemented std::endian, but did not define that feature detection macro. | |
#define | SEQAN3_CPP_LIB_INT_POW2 IMPLEMENTATION_DEFINED |
This defines __cpp_lib_int_pow2.Note: g++-9.3 -std=c++2a on ubuntu 20.04 did #define __cpp_lib_int_pow2 201806L , which is an older implementation of the __cpp_lib_int_pow2 proposal. More... | |
Enumerations | |
enum class | std::endian { std::endian::little = __ORDER_LITTLE_ENDIAN__ , std::endian::big = __ORDER_BIG_ENDIAN__ , std::endian::native = __BYTE_ORDER__ } |
Indicates the endianness of all scalar types. More... | |
Functions | |
template<class T > | |
constexpr T | std::bit_ceil (T x) noexcept |
Calculates the smallest integral power of two that is not smaller than x. More... | |
template<class T > | |
constexpr T | std::bit_width (T x) noexcept |
If x is not zero, calculates the number of bits needed to store the value x, that is, 1 + floor(log2(x)). If x is zero, returns zero. More... | |
template<class T > | |
constexpr int | std::countl_zero (T x) noexcept |
Returns the number of consecutive 0 bits in the value of x, starting from the most significant bit ("left"). More... | |
template<class T > | |
constexpr int | std::countr_zero (T x) noexcept |
Returns the number of consecutive 0 bits in the value of x, starting from the least significant bit ("right"). More... | |
template<class T > | |
constexpr bool | std::has_single_bit (T x) noexcept |
Checks if x is an integral power of two. More... | |
template<class T > | |
constexpr int | std::popcount (T x) noexcept |
Returns the number of 1 bits in the value of x. More... | |
The <bit> header from C++20's standard library.