1 module beard.type_list;
2 
3 public import std.typetuple : TypeTuple, staticIndexOf;
4 
5 /// like TupleList but packs everything into one type
6 template TL(T...) {
7     alias TypeTuple!T types;
8 
9     template append(U...) {
10         alias TL!(T, U) append;
11     }
12 
13     template contains(U) {
14         enum contains = indexOf!U != -1;
15     }
16 
17     template indexOf(U) {
18         enum indexOf = staticIndexOf!(U, T);
19     }
20 }
21 // vim:ts=4 sw=4