xieite::type_list<Ts...>::find<>

Defined in header <xieite/meta/type_list.hpp>

Finds the first element in a xieite::type_list {} that satisfies some functor.


Definition

template<auto cond>
requires(xieite::is_satisfd_any<cond, Ts...>)
using find = xieite::type_list<Ts...>::at<xieite::type_list<Ts...>::find_idx<cond>>;


Example

int main() {
	using List = xieite::type_list<int, char, float, void*>;

	xieite::dump(xieite::name<List::find<[]<std::floating_point> {}>>());
}
Possible output:
float
[View in Compiler Explorer]