@@ -1385,24 +1385,24 @@ template <auto A, auto B> struct char_range {
1385
1385
}
1386
1386
};
1387
1387
1388
- struct word_chars : set<char_range<' A' ,' Z' >, char_range<' a' ,' z' >, char_range<' 0' ,' 9' >, character<' _' > > { } ;
1388
+ using word_chars = set<char_range<' A' ,' Z' >, char_range<' a' ,' z' >, char_range<' 0' ,' 9' >, character<' _' > >;
1389
1389
1390
- struct space_chars : enumeration<' ' , ' \t ' , ' \n ' , ' \v ' , ' \f ' , ' \r ' > {} ;
1390
+ using space_chars = enumeration<' ' , ' \t ' , ' \n ' , ' \v ' , ' \f ' , ' \r ' >;
1391
1391
1392
- struct alphanum_chars : set<char_range<' A' ,' Z' >, char_range<' a' ,' z' >, char_range<' 0' ,' 9' > > { } ;
1392
+ using alphanum_chars = set<char_range<' A' ,' Z' >, char_range<' a' ,' z' >, char_range<' 0' ,' 9' > >;
1393
1393
1394
- struct alpha_chars : set<char_range<' A' ,' Z' >, char_range<' a' ,' z' > > { } ;
1394
+ using alpha_chars = set<char_range<' A' ,' Z' >, char_range<' a' ,' z' > >;
1395
1395
1396
- struct xdigit_chars : set<char_range<' A' ,' F' >, char_range<' a' ,' f' >, char_range<' 0' ,' 9' > > { } ;
1396
+ using xdigit_chars = set<char_range<' A' ,' F' >, char_range<' a' ,' f' >, char_range<' 0' ,' 9' > >;
1397
1397
1398
- struct punct_chars
1399
- : enumeration<' !' , ' "' , ' #' , ' $' , ' %' , ' &' , ' \' ' , ' (' , ' )' , ' *' , ' ,' , ' -' ,
1398
+ using punct_chars
1399
+ = enumeration<' !' , ' "' , ' #' , ' $' , ' %' , ' &' , ' \' ' , ' (' , ' )' , ' *' , ' ,' , ' -' ,
1400
1400
' .' , ' /' , ' :' , ' ;' , ' <' , ' =' , ' >' , ' ?' , ' @' , ' [' , ' \\ ' , ' ]' ,
1401
- ' ^' , ' _' , ' `' , ' {' , ' |' , ' }' , ' ~' > {} ;
1401
+ ' ^' , ' _' , ' `' , ' {' , ' |' , ' }' , ' ~' >;
1402
1402
1403
- struct digit_chars : char_range<' 0' ,' 9' > { } ;
1403
+ using digit_chars = char_range<' 0' ,' 9' >;
1404
1404
1405
- struct ascii_chars : char_range<' \x00 ' ,' \x7F ' > { } ;
1405
+ using ascii_chars = char_range<' \x00 ' ,' \x7F ' >;
1406
1406
1407
1407
}
1408
1408
@@ -2427,14 +2427,6 @@ template <typename Iterator, typename... Captures> class regex_results {
2427
2427
return bool (_captures.template select <0 >());
2428
2428
}
2429
2429
2430
- constexpr CTRE_FORCE_INLINE auto operator *() const noexcept {
2431
- return *this ;
2432
- }
2433
-
2434
- constexpr CTRE_FORCE_INLINE auto operator *() noexcept {
2435
- return *this ;
2436
- }
2437
-
2438
2430
constexpr CTRE_FORCE_INLINE operator std::basic_string_view<char_type>() const noexcept {
2439
2431
return to_view ();
2440
2432
}
@@ -2874,6 +2866,10 @@ template <typename... Content> constexpr size_t calculate_size_of_first(ctll::li
2874
2866
return (calculate_size_of_first (Content{}) + ... + 0 );
2875
2867
}
2876
2868
2869
+ template <typename ... Content> constexpr size_t calculate_size_of_first (ctre::set<Content...>) {
2870
+ return (calculate_size_of_first (Content{}) + ... + 0 );
2871
+ }
2872
+
2877
2873
template <auto A, typename CB> constexpr int64_t negative_helper (ctre::character<A>, CB & cb, int64_t start) {
2878
2874
if (A != std::numeric_limits<int64_t >::min ()) {
2879
2875
if (start < A) {
@@ -3044,6 +3040,9 @@ template <size_t Capacity> class point_set {
3044
3040
template <typename ... Content> constexpr bool check (ctll::list<Content...>) {
3045
3041
return (check (Content{}) || ... || false );
3046
3042
}
3043
+ template <typename ... Content> constexpr bool check (ctre::set<Content...>) {
3044
+ return (check (Content{}) || ... || false );
3045
+ }
3047
3046
3048
3047
3049
3048
template <auto V> constexpr void populate (ctre::character<V>) {
@@ -3060,8 +3059,8 @@ template <size_t Capacity> class point_set {
3060
3059
this ->insert (low, high);
3061
3060
});
3062
3061
}
3063
- template <auto ... V > constexpr void populate (ctre::enumeration<V ...>) {
3064
- return ( insert (V,V ), ...);
3062
+ template <typename ... Content > constexpr void populate (ctre::set<Content ...>) {
3063
+ ( populate (Content{} ), ...);
3065
3064
}
3066
3065
template <typename ... Content> constexpr void populate (ctll::list<Content...>) {
3067
3066
(populate (Content{}), ...);
@@ -3447,7 +3446,7 @@ constexpr CTRE_FORCE_INLINE R evaluate(const Iterator begin, Iterator current, c
3447
3446
3448
3447
// backreference support (match agains content of iterators)
3449
3448
template <typename Iterator, typename EndIterator> constexpr CTRE_FORCE_INLINE string_match_result<Iterator> match_against_range (Iterator current, const EndIterator end, Iterator range_current, const Iterator range_end) noexcept {
3450
- while (current != end && range_current != range_end ) {
3449
+ while (end != current && range_end != range_current ) {
3451
3450
if (*current == *range_current) {
3452
3451
current++;
3453
3452
range_current++;
0 commit comments