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

Function FindIndexIf

util/generic/algorithm.h:203–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201
202template <class C, class P>
203constexpr size_t FindIndexIf(C&& c, P p) {
204 using std::begin;
205 using std::end;
206 auto it = FindIf(begin(c), end(c), p);
207 return it == end(c) ? NPOS : (it - begin(c));
208}
209
210// EqualToOneOf(x, "apple", "orange") means (x == "apple" || x == "orange")
211template <typename T, typename... Other>

Callers 1

Y_UNIT_TESTFunction · 0.85

Calls 3

FindIfFunction · 0.85
beginFunction · 0.70
endFunction · 0.70

Tested by

no test coverage detected