@@ -125,8 +125,8 @@ template <typename T, typename U> bool canTypeFitValue(const U Value) {
125
125
// - its internal representation overflows.
126
126
struct CheckedInt {
127
127
// Integral constructor, asserts if Value cannot be represented as intmax_t.
128
- template <typename Integral, typename std:: enable_if_t <
129
- std::is_integral<Integral>::value, bool > = 0 >
128
+ template <typename Integral,
129
+ std:: enable_if_t < std::is_integral<Integral>::value, bool > = 0 >
130
130
static CheckedInt from (Integral FromValue) {
131
131
if (!canTypeFitValue<intmax_t >(FromValue))
132
132
assertOutOfBounds ();
@@ -137,7 +137,7 @@ struct CheckedInt {
137
137
138
138
// Enum constructor, asserts if Value cannot be represented as intmax_t.
139
139
template <typename Enum,
140
- typename std::enable_if_t <std::is_enum<Enum>::value, bool > = 0 >
140
+ std::enable_if_t <std::is_enum<Enum>::value, bool > = 0 >
141
141
static CheckedInt from (Enum FromValue) {
142
142
using type = std::underlying_type_t <Enum>;
143
143
return from<type>(static_cast <type>(FromValue));
@@ -162,8 +162,8 @@ struct CheckedInt {
162
162
}
163
163
164
164
// Convert to integral, asserts if Value cannot be represented as Integral.
165
- template <typename Integral, typename std:: enable_if_t <
166
- std::is_integral<Integral>::value, bool > = 0 >
165
+ template <typename Integral,
166
+ std:: enable_if_t < std::is_integral<Integral>::value, bool > = 0 >
167
167
Integral to () const {
168
168
if (!canTypeFitValue<Integral>(Value))
169
169
assertOutOfBounds ();
@@ -173,7 +173,7 @@ struct CheckedInt {
173
173
// Convert to enum, asserts if Value cannot be represented as Enum's
174
174
// underlying type.
175
175
template <typename Enum,
176
- typename std::enable_if_t <std::is_enum<Enum>::value, bool > = 0 >
176
+ std::enable_if_t <std::is_enum<Enum>::value, bool > = 0 >
177
177
Enum to () const {
178
178
using type = std::underlying_type_t <Enum>;
179
179
return Enum (to<type>());
0 commit comments