Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.08 KB

bit-enum.md

File metadata and controls

44 lines (30 loc) · 1.08 KB
titledescriptionms.datef1_keywordshelpviewer_keywords
endian enum
enum used to specify the endianness of scalar types
08/27/2020
bit/std::endian
std::endian

endian enum

Indicates the endianness of all scalar types.

Syntax

enumclassendian { little = 0, big = 1, native = little };

Members

ElementDescription
littleIndicates that scalar types are little-endian. That is, the least significant byte is stored in the smallest address. For example, 0x1234 is stored 0x340x12.
bigIndicates that scalar types are big-endian, that is, the most significant byte is stored in the smallest address. For example, 0x1234 is stored 0x120x34.

Remarks

All native scalar types are little-endian for the platforms that Microsoft Visual C++ targets (x86, x64, ARM, ARM64).

Requirements

Header:<bit>

Namespace:std

Compiler option: /std:c++20 or later is required.

See also

<bit>

close