[Issue 3092] Indexing a tuple produces a tuple containing the indexed element

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 25 02:02:48 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3092





--- Comment #1 from Max Samukha <samukha at voliacable.com>  2009-06-25 02:02:47 PDT ---
A workaround (which doesn't mean that the bug is not critical):

template StaticTuple(A...)
{
    alias A StaticTuple;
}

template Foo(A...)
{
    alias StaticTuple!(A[0])[0] Foo;
}

void foo()
{
}

static assert(is(Foo!(int, foo) == int));

void main()
{
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list