@@ -14,7 +14,7 @@ namespace fly::detail {
14
14
* @author Timothy Flynn ([email protected] )
15
15
* @version January 3, 2021
16
16
*/
17
- template <typename CharType>
17
+ template <fly::StandardCharacter CharType>
18
18
class BasicClassifier
19
19
{
20
20
using traits = detail::BasicStringTraits<CharType>;
@@ -186,7 +186,7 @@ class BasicClassifier
186
186
};
187
187
188
188
// ==================================================================================================
189
- template <typename CharType>
189
+ template <fly::StandardCharacter CharType>
190
190
template <fly::StandardStringLike T>
191
191
constexpr auto BasicClassifier<CharType>::size(T &&value) -> size_type
192
192
{
@@ -203,7 +203,7 @@ constexpr auto BasicClassifier<CharType>::size(T &&value) -> size_type
203
203
}
204
204
205
205
// ==================================================================================================
206
- template <typename CharType>
206
+ template <fly::StandardCharacter CharType>
207
207
template <std::size_t N>
208
208
constexpr auto BasicClassifier<CharType>::size(const CharType (&value)[N]) -> size_type
209
209
{
@@ -212,28 +212,28 @@ constexpr auto BasicClassifier<CharType>::size(const CharType (&value)[N]) -> si
212
212
}
213
213
214
214
// ==================================================================================================
215
- template <typename CharType>
215
+ template <fly::StandardCharacter CharType>
216
216
constexpr bool BasicClassifier<CharType>::is_alpha(CharType ch)
217
217
{
218
218
return is_upper (unify_az_characters (ch));
219
219
}
220
220
221
221
// ==================================================================================================
222
- template <typename CharType>
222
+ template <fly::StandardCharacter CharType>
223
223
constexpr bool BasicClassifier<CharType>::is_upper(CharType ch)
224
224
{
225
225
return (ch >= s_upper_a) && (ch <= s_upper_z);
226
226
}
227
227
228
228
// ==================================================================================================
229
- template <typename CharType>
229
+ template <fly::StandardCharacter CharType>
230
230
constexpr bool BasicClassifier<CharType>::is_lower(CharType ch)
231
231
{
232
232
return (ch >= s_lower_a) && (ch <= s_lower_z);
233
233
}
234
234
235
235
// ==================================================================================================
236
- template <typename CharType>
236
+ template <fly::StandardCharacter CharType>
237
237
constexpr CharType BasicClassifier<CharType>::to_upper(CharType ch)
238
238
{
239
239
if (is_lower (ch))
@@ -245,7 +245,7 @@ constexpr CharType BasicClassifier<CharType>::to_upper(CharType ch)
245
245
}
246
246
247
247
// ==================================================================================================
248
- template <typename CharType>
248
+ template <fly::StandardCharacter CharType>
249
249
constexpr CharType BasicClassifier<CharType>::to_lower(CharType ch)
250
250
{
251
251
if (is_upper (ch))
@@ -257,30 +257,30 @@ constexpr CharType BasicClassifier<CharType>::to_lower(CharType ch)
257
257
}
258
258
259
259
// ==================================================================================================
260
- template <typename CharType>
260
+ template <fly::StandardCharacter CharType>
261
261
constexpr bool BasicClassifier<CharType>::is_digit(CharType ch)
262
262
{
263
263
return (ch ^ s_zero) < 10 ;
264
264
}
265
265
266
266
// ==================================================================================================
267
- template <typename CharType>
267
+ template <fly::StandardCharacter CharType>
268
268
constexpr bool BasicClassifier<CharType>::is_x_digit(CharType ch)
269
269
{
270
270
const auto alpha = unify_az_characters (ch);
271
271
return is_digit (ch) || ((alpha >= s_upper_a) && (alpha <= s_upper_f));
272
272
}
273
273
274
274
// ==================================================================================================
275
- template <typename CharType>
275
+ template <fly::StandardCharacter CharType>
276
276
constexpr bool BasicClassifier<CharType>::is_space(CharType ch)
277
277
{
278
278
return (ch == s_space) || (ch == s_form_feed) || (ch == s_line_feed) ||
279
279
(ch == s_carriage_return) || (ch == s_horizontal_tab) || (ch == s_vertical_tab);
280
280
}
281
281
282
282
// ==================================================================================================
283
- template <typename CharType>
283
+ template <fly::StandardCharacter CharType>
284
284
constexpr CharType BasicClassifier<CharType>::unify_az_characters(CharType ch)
285
285
{
286
286
return static_cast <CharType>(static_cast <int_type>(ch) & s_case_mask);
0 commit comments