Don't know if this might help anybody, but I needed something like it. Finding the first occurrence of a given type in a variadic parameter pack. Might be better ways to accomplish this, but this works well enough for me. https://godbolt.org/z/6Mu-2F
I ended up using this to basically enumerate types in a tagged union class. Whenever I call get<T>(), I get the type's index (known at compile time) and can make decisions about copying, destructing the old value, etc.