From Jason Turner

[support.types.byteops]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp406shvbc/{from.md → to.md} +122 -0
tmp/tmp406shvbc/{from.md → to.md} RENAMED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### `byte` type operations <a id="support.types.byteops">[[support.types.byteops]]</a>
2
+
3
+ ``` cpp
4
+ template <class IntType>
5
+ constexpr byte& operator<<=(byte& b, IntType shift) noexcept;
6
+ ```
7
+
8
+ *Remarks:* This function shall not participate in overload resolution
9
+ unless `is_integral_v<IntType>` is `true`.
10
+
11
+ *Effects:* Equivalent to:
12
+ `return b = byte(static_cast<unsigned char>(b) << shift);`
13
+
14
+ ``` cpp
15
+ template <class IntType>
16
+ constexpr byte operator<<(byte b, IntType shift) noexcept;
17
+ ```
18
+
19
+ *Remarks:* This function shall not participate in overload resolution
20
+ unless `is_integral_v<IntType>` is `true`.
21
+
22
+ *Effects:* Equivalent to:
23
+ `return byte(static_cast<unsigned char>(b) << shift);`
24
+
25
+ ``` cpp
26
+ template <class IntType>
27
+ constexpr byte& operator>>=(byte& b, IntType shift) noexcept;
28
+ ```
29
+
30
+ *Remarks:* This function shall not participate in overload resolution
31
+ unless `is_integral_v<IntType>` is `true`.
32
+
33
+ *Effects:* Equivalent to:
34
+ `return b = byte(static_cast<unsigned char>(b) >> shift);`
35
+
36
+ ``` cpp
37
+ template <class IntType>
38
+ constexpr byte operator>>(byte b, IntType shift) noexcept;
39
+ ```
40
+
41
+ *Remarks:* This function shall not participate in overload resolution
42
+ unless `is_integral_v<IntType>` is `true`.
43
+
44
+ *Effects:* Equivalent to:
45
+ `return byte(static_cast<unsigned char>(b) >> shift);`
46
+
47
+ ``` cpp
48
+ constexpr byte& operator|=(byte& l, byte r) noexcept;
49
+ ```
50
+
51
+ *Effects:* Equivalent to:
52
+
53
+ ``` cpp
54
+ return l = byte(static_cast<unsigned char>(l) | static_cast<unsigned char>(r));
55
+ ```
56
+
57
+ ``` cpp
58
+ constexpr byte operator|(byte l, byte r) noexcept;
59
+ ```
60
+
61
+ *Effects:* Equivalent to:
62
+
63
+ ``` cpp
64
+ return byte(static_cast<unsigned char>(l) | static_cast<unsigned char>(r));
65
+ ```
66
+
67
+ ``` cpp
68
+ constexpr byte& operator&=(byte& l, byte r) noexcept;
69
+ ```
70
+
71
+ *Effects:* Equivalent to:
72
+
73
+ ``` cpp
74
+ return l = byte(static_cast<unsigned char>(l) & static_cast<unsigned char>(r));
75
+ ```
76
+
77
+ ``` cpp
78
+ constexpr byte operator&(byte l, byte r) noexcept;
79
+ ```
80
+
81
+ *Effects:* Equivalent to:
82
+
83
+ ``` cpp
84
+ return byte(static_cast<unsigned char>(l) & static_cast<unsigned char>(r));
85
+ ```
86
+
87
+ ``` cpp
88
+ constexpr byte& operator^=(byte& l, byte r) noexcept;
89
+ ```
90
+
91
+ *Effects:* Equivalent to:
92
+
93
+ ``` cpp
94
+ return l = byte(static_cast<unsigned char>(l) ^ static_cast<unsigned char>(r));
95
+ ```
96
+
97
+ ``` cpp
98
+ constexpr byte operator^(byte l, byte r) noexcept;
99
+ ```
100
+
101
+ *Effects:* Equivalent to:
102
+
103
+ ``` cpp
104
+ return byte(static_cast<unsigned char>(l) ^ static_cast<unsigned char>(r));
105
+ ```
106
+
107
+ ``` cpp
108
+ constexpr byte operator~(byte b) noexcept;
109
+ ```
110
+
111
+ *Effects:* Equivalent to: `return byte(s̃tatic_cast<unsigned char>(b));`
112
+
113
+ ``` cpp
114
+ template <class IntType>
115
+ constexpr IntType to_integer(byte b) noexcept;
116
+ ```
117
+
118
+ *Remarks:* This function shall not participate in overload resolution
119
+ unless `is_integral_v<IntType>` is `true`.
120
+
121
+ *Effects:* Equivalent to: `return IntType(b);`
122
+