22 General utilities library [utilities] (original) (raw)

22.11 Bit manipulation [bit]

22.11.2 Header synopsis [bit.syn]

namespace std { template<class To, class From> constexpr To bit_cast(const From& from) noexcept;template<class T> constexpr T byteswap(T value) noexcept;template<class T> constexpr bool has_single_bit(T x) noexcept;template<class T> constexpr T bit_ceil(T x);template<class T> constexpr T bit_floor(T x) noexcept;template<class T> constexpr int bit_width(T x) noexcept;template<class T> constexpr T rotl(T x, int s) noexcept;template<class T> constexpr T rotr(T x, int s) noexcept;template<class T> constexpr int countl_zero(T x) noexcept;template<class T> constexpr int countl_one(T x) noexcept;template<class T> constexpr int countr_zero(T x) noexcept;template<class T> constexpr int countr_one(T x) noexcept;template<class T> constexpr int popcount(T x) noexcept;enum class endian { little = see below, big = see below, native = see below };}