@@ -2831,6 +2831,15 @@ template <typename CB> constexpr int64_t negative_helper(ctre::enumeration<>, CB
28312831 return start;
28322832}
28332833
2834+ template <typename CB> constexpr int64_t negative_helper (ctre::set<>, CB &, int64_t start) {
2835+ return start;
2836+ }
2837+
2838+ template <typename Head, typename ... Rest, typename CB> constexpr int64_t negative_helper (ctre::set<Head, Rest...>, CB & cb, int64_t start) {
2839+ start = negative_helper (Head{}, cb, start);
2840+ return negative_helper (ctre::set<Rest...>{}, cb, start);
2841+ }
2842+
28342843template <typename Head, typename ... Rest, typename CB> constexpr void negative_helper (ctre::negative_set<Head, Rest...>, CB && cb, int64_t start = std::numeric_limits<int64_t >::min()) {
28352844 start = negative_helper (Head{}, cb, start);
28362845 negative_helper (ctre::negative_set<Rest...>{}, std::forward<CB>(cb), start);
@@ -3252,7 +3261,9 @@ template <typename... T> struct identify_type;
32523261template <typename R, typename Iterator, typename EndIterator, size_t A, size_t B, typename ... Content, typename ... Tail>
32533262constexpr CTRE_FORCE_INLINE R evaluate (const Iterator begin, Iterator current, const EndIterator end, R captures, [[maybe_unused]] ctll::list<repeat<A,B,Content...>, Tail...> stack) {
32543263 // check if it can be optimized
3264+ #ifndef CTRE_DISABLE_GREEDY_OPT
32553265 if constexpr (collides (calculate_first (Content{}...), calculate_first (Tail{}...))) {
3266+ #endif
32563267 // A..B
32573268 size_t i{0 };
32583269 for (; i < A && (A != 0 ); ++i) {
@@ -3265,11 +3276,12 @@ constexpr CTRE_FORCE_INLINE R evaluate(const Iterator begin, Iterator current, c
32653276 }
32663277
32673278 return evaluate_recursive (i, begin, current, end, captures, stack);
3279+ #ifndef CTRE_DISABLE_GREEDY_OPT
32683280 } else {
32693281 // if there is no collision we can go possessive
32703282 return evaluate (begin, current, end, captures, ctll::list<possessive_repeat<A,B,Content...>, Tail...>());
32713283 }
3272-
3284+ # endif
32733285
32743286}
32753287
0 commit comments