xieite::type_list<Ts...>::idx_of<>

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

Finds the first index of an element in a xieite::type_list {}.


Definition

template<typename T, auto cmp = []<typename U, std::same_as<U>> {}>
requires(xieite::type_list<Ts...>::has<T, cmp>)
static constexpr std::size_t idx_of = /* ??? */;


Example

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

	xieite::dump(List::idx_of<float>);
}
Output:
2
[View in Compiler Explorer]