tmp/tmpc788e78r/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### `byteswap` <a id="bit.byteswap">[[bit.byteswap]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<class T>
|
| 5 |
+
constexpr T byteswap(T value) noexcept;
|
| 6 |
+
```
|
| 7 |
+
|
| 8 |
+
*Constraints:* `T` models `integral`.
|
| 9 |
+
|
| 10 |
+
*Mandates:* `T` does not have padding bits [[basic.types.general]].
|
| 11 |
+
|
| 12 |
+
Let the sequence R comprise the bytes of the object representation of
|
| 13 |
+
`value` in reverse order.
|
| 14 |
+
|
| 15 |
+
*Returns:* An object `v` of type `T` such that each byte in the object
|
| 16 |
+
representation of `v` is equal to the byte in the corresponding position
|
| 17 |
+
in R.
|
| 18 |
+
|