question on tuples and expressions

Jarrett Billingsley jarrett.billingsley at gmail.com
Mon Jan 5 11:42:30 PST 2009


On Mon, Jan 5, 2009 at 2:39 PM, Denis Koroskin <2korden at gmail.com> wrote:
> Both work for me (dmd 2.012):
>
> import std.typecons;
>
> void main()
> {
>   Tuple!(int, int) x = Tuple!(int, int)(1, 2);
>   Tuple!(int, int) y = {1, 2};
> }
>

Now you're comparing apples and oranges :)  A typical:

template Tuple(T...) { alias T Tuple; }

template does not behave anything like the one defined in std.typecons.


More information about the Digitalmars-d-learn mailing list