Skip to content

Commit 5d5aa1f

Browse files
authored
Merge pull request #3072 from TylerMSFT/twhitney-bit
<bit> STL library docs
2 parents 2d9fbc1 + 7a85d8a commit 5d5aa1f

4 files changed

Lines changed: 809 additions & 0 deletions

File tree

docs/standard-library/bit-enum.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: "endian enum"
3+
description: "enum used to specify the endianness of scalar types"
4+
ms.date: "08/27/2020"
5+
f1_keywords: ["bit/std::endian"]
6+
helpviewer_keywords: ["std::endian"]
7+
---
8+
# endian enum
9+
10+
Indicates the endianness of all scalar types.
11+
12+
## Syntax
13+
14+
```cpp
15+
enum class endian {
16+
little = 0,
17+
big = 1,
18+
native = little
19+
};
20+
```
21+
22+
### Members
23+
24+
|Element|Description|
25+
|-|-|
26+
| `little` | Indicates that scalar types are little-endian. That is, the least significant byte is stored in the smallest address. For example, `0x1234` is stored `0x34` `0x12`. |
27+
| `big` | Indicates that scalar types are big-endian, that is, the most significant byte is stored in the smallest address. For example, `0x1234` is stored `0x12` `0x34`. |
28+
29+
## Remarks
30+
31+
All native scalar types are little-endian for the platforms that Microsoft Visual C++ targets (x86, x64, ARM, ARM64).
32+
33+
## Requirements
34+
35+
**Header:** \<bit>
36+
37+
**Namespace:** std
38+
39+
`/std:c++latest` is required
40+
41+
## See also
42+
43+
[\<bit>](../standard-library/bit.md)

0 commit comments

Comments
 (0)