MCPcopy Create free account
hub / github.com/catboost/catboost / AnyOfImpl

Function AnyOfImpl

util/generic/algorithm.h:572–582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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...>) {

Callers 1

AnyOfFunction · 0.85

Calls 2

Y_UNUSEDFunction · 0.85
wrapperFunction · 0.50

Tested by

no test coverage detected