view test/tuple1.d @ 97:c4e161556a21 trunk

[svn r101] Split up CastExp into several smaller utility functions.
author lindquist
date Wed, 14 Nov 2007 20:18:01 +0100
parents 8d45266bbabe
children
line wrap: on
line source

module tuple1;

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

struct S
{
    int i;
    long l;
}

void main()
{
    S s = S(Tuple!(1,2L));
    assert(s.i == 1);
    assert(s.l == 2);
}