Files
cppdraft_translate/cppdraft/bit/syn.md
2025-10-25 03:02:53 +03:00

12 lines
1.4 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[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.3Function template bit_­cast"), bit_casttemplate<class To, class From>constexpr To bit_cast(const From& from) noexcept; // [[bit.byteswap]](bit.byteswap "22.11.4byteswap"), byteswaptemplate<class T>constexpr T byteswap(T value) noexcept; // [[bit.pow.two]](bit.pow.two "22.11.5Integral 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.6Rotating"), 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.7Counting"), 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.8Endian"), endianenum class endian { little = *see below*,
big = *see below*,
native = *see below*};}