view tests/mini/tuplestruct.d @ 1137:45d73f0a9b43

Automated merge with http://hg.dsource.org/projects/ldc
author Christian Kamm <kamm incasoftware de>
date Tue, 24 Mar 2009 14:34:16 +0100
parents 8ebbad15fc99
children
line wrap: on
line source

struct V(T...) {
    T v;
}

alias V!(float, int) MyV;

void main()
{
    assert(MyV.sizeof == float.sizeof + int.sizeof);
    auto f = 3.75f;
    auto v = MyV(f, 3);
    assert(v.v[0] == 3.75f);
    assert(v.v[1] == 3);
}