Files
2025-10-25 03:02:53 +03:00

1.4 KiB

[bit.syn]

22 General utilities library [utilities]

22.11 Bit manipulation [bit]

22.11.2 Header synopsis [bit.syn]

// all freestandingnamespace std {// [bit.cast], bit_casttemplate<class To, class From>constexpr To bit_cast(const From& from) noexcept; // [bit.byteswap], byteswaptemplateconstexpr T byteswap(T value) noexcept; // [bit.pow.two], integral powers of 2templateconstexpr bool has_single_bit(T x) noexcept; templateconstexpr T bit_ceil(T x); templateconstexpr T bit_floor(T x) noexcept; templateconstexpr int bit_width(T x) noexcept; // [bit.rotate], rotatingtemplateconstexpr T rotl(T x, int s) noexcept; templateconstexpr T rotr(T x, int s) noexcept; // [bit.count], countingtemplateconstexpr int countl_zero(T x) noexcept; templateconstexpr int countl_one(T x) noexcept; templateconstexpr int countr_zero(T x) noexcept; templateconstexpr int countr_one(T x) noexcept; templateconstexpr int popcount(T x) noexcept; // [bit.endian], endianenum class endian { little = see below, big = see below, native = see below};}