@@ -1385,24 +1385,24 @@ template <auto A, auto B> struct char_range {
13851385 }
13861386};
13871387
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<' _' > >;
13891389
1390- struct space_chars : enumeration<' ' , ' \t ' , ' \n ' , ' \v ' , ' \f ' , ' \r ' > {} ;
1390+ using space_chars = enumeration<' ' , ' \t ' , ' \n ' , ' \v ' , ' \f ' , ' \r ' >;
13911391
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' > >;
13931393
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' > >;
13951395
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' > >;
13971397
1398- struct punct_chars
1399- : enumeration<' !' , ' "' , ' #' , ' $' , ' %' , ' &' , ' \' ' , ' (' , ' )' , ' *' , ' ,' , ' -' ,
1398+ using punct_chars
1399+ = enumeration<' !' , ' "' , ' #' , ' $' , ' %' , ' &' , ' \' ' , ' (' , ' )' , ' *' , ' ,' , ' -' ,
14001400 ' .' , ' /' , ' :' , ' ;' , ' <' , ' =' , ' >' , ' ?' , ' @' , ' [' , ' \\ ' , ' ]' ,
1401- ' ^' , ' _' , ' `' , ' {' , ' |' , ' }' , ' ~' > {} ;
1401+ ' ^' , ' _' , ' `' , ' {' , ' |' , ' }' , ' ~' >;
14021402
1403- struct digit_chars : char_range<' 0' ,' 9' > { } ;
1403+ using digit_chars = char_range<' 0' ,' 9' >;
14041404
1405- struct ascii_chars : char_range<' \x00 ' ,' \x7F ' > { } ;
1405+ using ascii_chars = char_range<' \x00 ' ,' \x7F ' >;
14061406
14071407}
14081408
@@ -2427,14 +2427,6 @@ template <typename Iterator, typename... Captures> class regex_results {
24272427 return bool (_captures.template select <0 >());
24282428 }
24292429
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-
24382430 constexpr CTRE_FORCE_INLINE operator std::basic_string_view<char_type>() const noexcept {
24392431 return to_view ();
24402432 }
@@ -2874,6 +2866,10 @@ template <typename... Content> constexpr size_t calculate_size_of_first(ctll::li
28742866 return (calculate_size_of_first (Content{}) + ... + 0 );
28752867}
28762868
2869+ template <typename ... Content> constexpr size_t calculate_size_of_first (ctre::set<Content...>) {
2870+ return (calculate_size_of_first (Content{}) + ... + 0 );
2871+ }
2872+
28772873template <auto A, typename CB> constexpr int64_t negative_helper (ctre::character<A>, CB & cb, int64_t start) {
28782874 if (A != std::numeric_limits<int64_t >::min ()) {
28792875 if (start < A) {
@@ -3044,6 +3040,9 @@ template <size_t Capacity> class point_set {
30443040 template <typename ... Content> constexpr bool check (ctll::list<Content...>) {
30453041 return (check (Content{}) || ... || false );
30463042 }
3043+ template <typename ... Content> constexpr bool check (ctre::set<Content...>) {
3044+ return (check (Content{}) || ... || false );
3045+ }
30473046
30483047
30493048 template <auto V> constexpr void populate (ctre::character<V>) {
@@ -3060,8 +3059,8 @@ template <size_t Capacity> class point_set {
30603059 this ->insert (low, high);
30613060 });
30623061 }
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{} ), ...);
30653064 }
30663065 template <typename ... Content> constexpr void populate (ctll::list<Content...>) {
30673066 (populate (Content{}), ...);
@@ -3447,7 +3446,7 @@ constexpr CTRE_FORCE_INLINE R evaluate(const Iterator begin, Iterator current, c
34473446
34483447// backreference support (match agains content of iterators)
34493448template <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 ) {
34513450 if (*current == *range_current) {
34523451 current++;
34533452 range_current++;
0 commit comments