| 557 | namespace NPrivate { |
| 558 | template <class T, class TOp, size_t... Is> |
| 559 | constexpr bool AllOfImpl(T&& t, TOp&& op, std::index_sequence<Is...>) { |
| 560 | #if _LIBCPP_STD_VER >= 17 |
| 561 | return (true && ... && op(std::get<Is>(std::forward<T>(t)))); |
| 562 | #else |
| 563 | bool result = true; |
| 564 | auto wrapper = [&result, &op](auto&& x) { result = result && op(std::forward<decltype(x)>(x)); }; |
| 565 | int dummy[] = {(wrapper(std::get<Is>(std::forward<T>(t))), 0)...}; |
| 566 | Y_UNUSED(dummy); |
| 567 | return result; |
| 568 | #endif |
| 569 | } |
| 570 | |
| 571 | template <class T, class TOp, size_t... Is> |
| 572 | constexpr bool AnyOfImpl(T&& t, TOp&& op, std::index_sequence<Is...>) { |