Return the index of a value which type satisfies a given predicate.
#include <kumi/kumi.hpp>
#include <iostream>
#include <type_traits>
int main()
{
std::cout << std::boolalpha
<<
kumi::locate( t, kumi::predicate<std::is_floating_point>() ) <<
"\n";
std::cout << std::boolalpha <<
kumi::locate( t, [](
auto e) {
return e > 3; } ) <<
"\n";
}
constexpr auto locate(Tuple &&t, Pred p) noexcept
Return the index of a value which type satisfies a given predicate.
Definition find.hpp:23
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:37