| 570 | |
| 571 | template <class T, class TOp, size_t... Is> |
| 572 | constexpr bool AnyOfImpl(T&& t, TOp&& op, std::index_sequence<Is...>) { |
| 573 | #if _LIBCPP_STD_VER >= 17 |
| 574 | return (false || ... || op(std::get<Is>(std::forward<T>(t)))); |
| 575 | #else |
| 576 | bool result = false; |
| 577 | auto wrapper = [&result, &op](auto&& x) { result = result || op(std::forward<decltype(x)>(x)); }; |
| 578 | int dummy[] = {(wrapper(std::get<Is>(std::forward<T>(t))), 0)...}; |
| 579 | Y_UNUSED(dummy); |
| 580 | return result; |
| 581 | #endif |
| 582 | } |
| 583 | |
| 584 | template <class T, class TOp, size_t... Is> |
| 585 | constexpr void ForEachImpl(T&& t, TOp&& op, std::index_sequence<Is...>) { |