@@ -112,32 +112,30 @@ _LIBCPP_HIDE_FROM_ABI constexpr byte operator~ (byte __b) noexcept
112
112
));
113
113
}
114
114
115
- template <class _Tp >
116
- using _EnableByteOverload = __enable_if_t <is_integral<_Tp>::value, byte>;
117
-
118
- template <class _Integer >
119
- _LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer> &
120
- operator <<=(byte& __lhs, _Integer __shift) noexcept
121
- { return __lhs = __lhs << __shift; }
122
-
123
- template <class _Integer >
124
- _LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer>
125
- operator << (byte __lhs, _Integer __shift) noexcept
126
- { return static_cast <byte>(static_cast <unsigned char >(static_cast <unsigned int >(__lhs) << __shift)); }
127
-
128
- template <class _Integer >
129
- _LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer> &
130
- operator >>=(byte& __lhs, _Integer __shift) noexcept
131
- { return __lhs = __lhs >> __shift; }
132
-
133
- template <class _Integer >
134
- _LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer>
135
- operator >> (byte __lhs, _Integer __shift) noexcept
136
- { return static_cast <byte>(static_cast <unsigned char >(static_cast <unsigned int >(__lhs) >> __shift)); }
137
-
138
- template <class _Integer , class = _EnableByteOverload<_Integer> >
139
- _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Integer
140
- to_integer (byte __b) noexcept { return static_cast <_Integer>(__b); }
115
+ template <class _Integer , __enable_if_t <is_integral<_Integer>::value, int > = 0 >
116
+ _LIBCPP_HIDE_FROM_ABI constexpr byte& operator <<=(byte& __lhs, _Integer __shift) noexcept {
117
+ return __lhs = __lhs << __shift;
118
+ }
119
+
120
+ template <class _Integer , __enable_if_t <is_integral<_Integer>::value, int > = 0 >
121
+ _LIBCPP_HIDE_FROM_ABI constexpr byte operator <<(byte __lhs, _Integer __shift) noexcept {
122
+ return static_cast <byte>(static_cast <unsigned char >(static_cast <unsigned int >(__lhs) << __shift));
123
+ }
124
+
125
+ template <class _Integer , __enable_if_t <is_integral<_Integer>::value, int > = 0 >
126
+ _LIBCPP_HIDE_FROM_ABI constexpr byte& operator >>=(byte& __lhs, _Integer __shift) noexcept {
127
+ return __lhs = __lhs >> __shift;
128
+ }
129
+
130
+ template <class _Integer , __enable_if_t <is_integral<_Integer>::value, int > = 0 >
131
+ _LIBCPP_HIDE_FROM_ABI constexpr byte operator >>(byte __lhs, _Integer __shift) noexcept {
132
+ return static_cast <byte>(static_cast <unsigned char >(static_cast <unsigned int >(__lhs) >> __shift));
133
+ }
134
+
135
+ template <class _Integer , __enable_if_t <is_integral<_Integer>::value, int > = 0 >
136
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Integer to_integer (byte __b) noexcept {
137
+ return static_cast <_Integer>(__b);
138
+ }
141
139
142
140
} // namespace std
143
141
0 commit comments