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

Function AllOfImpl

util/generic/algorithm.h:559–569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

AllOfFunction · 0.85

Calls 2

Y_UNUSEDFunction · 0.85
wrapperFunction · 0.50

Tested by

no test coverage detected