diff --git a/src/core/include/units/bits/algorithm.h b/src/core/include/units/bits/algorithm.h index ca3877e4..92aa4200 100644 --- a/src/core/include/units/bits/algorithm.h +++ b/src/core/include/units/bits/algorithm.h @@ -60,6 +60,19 @@ constexpr auto get_first_of(const Rng& rng, UnaryFunction f) } // TODO remove all the below and use std when moved to modules +template +constexpr InputIt find_first_of(InputIt first, InputIt last, ForwardIt s_first, ForwardIt s_last) +{ + for (; first != last; ++first) { + for (ForwardIt it = s_first; it != s_last; ++it) { + if (*first == *it) { + return first; + } + } + } + return last; +} + template constexpr bool equal(InputIt1 first1, InputIt1 last1, InputIt2 first2) {