1 /**
2  * This module was renamed to disambiguate the term tuple, use
3  * $(MREF std, meta) instead.
4  *
5  * Copyright: Copyright The D Language Foundation 2005 - 2015.
6  * License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
7  * Authors:
8  * Source:    $(PHOBOSSRC std/typetuple.d)
9  *
10  * $(SCRIPT inhibitQuickIndex = 1;)
11  */
12 module std.typetuple;
13 
14 public import std.meta;
15 
16 /**
17  * Alternate name for $(REF AliasSeq, std,meta) for legacy compatibility.
18  */
19 alias TypeTuple = AliasSeq;
20 
21 ///
22 @safe unittest
23 {
24     import std.typetuple;
25     alias TL = TypeTuple!(int, double);
26 
27     int foo(TL td)  // same as int foo(int, double);
28     {
29         return td[0] + cast(int) td[1];
30     }
31     assert(foo(1, 2.5) == 3);
32 }
33 
34 ///
35 @safe unittest
36 {
37     alias TL = TypeTuple!(int, double);
38 
39     alias Types = TypeTuple!(TL, char);
40     static assert(is(Types == TypeTuple!(int, double, char)));
41 }
Suggestion Box / Bug Report