[bit.syn]

# 22 General utilities library [[utilities]](./#utilities)

## 22.11 Bit manipulation [[bit]](bit#syn)

### 22.11.2 Header <bit> synopsis [bit.syn]

// all freestandingnamespace std {// [[bit.cast]](bit.cast "22.11.3 Function template bit_­cast"), bit_casttemplate<class To, class From>constexpr To bit_cast(const From& from) noexcept; // [[bit.byteswap]](bit.byteswap "22.11.4 byteswap"), byteswaptemplate<class T>constexpr T byteswap(T value) noexcept; // [[bit.pow.two]](bit.pow.two "22.11.5 Integral powers of 2"), integral powers of 2template<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; // [[bit.rotate]](bit.rotate "22.11.6 Rotating"), rotatingtemplate<class T>constexpr T rotl(T x, int s) noexcept; template<class T>constexpr T rotr(T x, int s) noexcept; // [[bit.count]](bit.count "22.11.7 Counting"), countingtemplate<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; // [[bit.endian]](bit.endian "22.11.8 Endian"), endianenum class endian { little = *see below*,
 big = *see below*,
 native = *see below*};}
