|
|
(C++20) | ||||
(C++23) | ||||
Integral powers of2 | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
Rotating | ||||
(C++20) | ||||
(C++20) | ||||
Counting | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
Endian | ||||
endian (C++20) |
Defined in header <bit> | ||
enumclass endian { | (since C++20) | |
Indicates theendianness of allscalar types:
Corner case platforms are also supported:
sizeof
equal to1, endianness does not matter and all three values,std::endian::little,std::endian::big, andstd::endian::native are the same.Contents |
enumclass endian{#if defined(_MSC_VER) && !defined(__clang__) little=0, big=1, native= little#else little= __ORDER_LITTLE_ENDIAN__, big= __ORDER_BIG_ENDIAN__, native= __BYTE_ORDER__#endif};
Feature-test macro | Value | Std | Feature |
---|---|---|---|
__cpp_lib_endian | 201907L | (C++20) | std::endian |
Possible output:
mixed-endian
(C++23) | reverses the bytes in the given integer value (function template)[edit] |
C documentation forendian |