Debian Codegraph @

libphobos/testsuite/libphobos.phobos/std_typetuple.d

raw
1 @safe unittest
2 {
3 import std.typetuple;
4
5 import std.typetuple;
6 alias TL = TypeTuple!(int, double);
7
8 int foo(TL td) // same as int foo(int, double);
9 {
10 return td[0] + cast(int) td[1];
11 }
12 assert(foo(1, 2.5) == 3);
13 }
14
15 @safe unittest
16 {
17 import std.typetuple;
18
19 alias TL = TypeTuple!(int, double);
20
21 alias Types = TypeTuple!(TL, char);
22 static assert(is(Types == TypeTuple!(int, double, char)));
23 }
24