Suppose I have a std::tuple
:
std::tuple<Types...> myTuple;
// fill myTuple with stuff
Now I want to find if func
returns true for any element in the lambda, where func
is some lambda, e.g.:
auto func = [](auto&& x) -> bool { return someOperation(x); }
How can I do this? Note that Types...
may be large so I don't want to iterate over all elements every time.