LLVM 20.0.0git
llvm::FirstIndexOfType< T, Us > Struct Template Reference

Find the first index where a type appears in a list of types. More...

Detailed Description

template<typename T, typename... Us>
struct llvm::FirstIndexOfType< T, Us >

Find the first index where a type appears in a list of types.

FirstIndexOfType<T, Us...>::value is the first index of T in Us.

Typically only meaningful when it is otherwise statically known that the type pack has no duplicate types. This should be guaranteed explicitly with static_assert(TypesAreDistinct<Us...>::value).

It is a compile-time error to instantiate when T is not present in Us, i.e. if is_one_of<T, Us...>::value is false.

Definition at line 168 of file STLExtras.h.


The documentation for this struct was generated from the following file: