Is D a cult?

Walter Bright newshound1 at digitalmars.com
Mon Mar 8 12:21:20 PST 2010


grauzone wrote:
> Sorry for being dense, but again: what does alignment have to do with 
> this?

    alias TypeTuple!(char, int) TT;

These declarations must be IDENTICAL:

    void foo(TT);
    void foo(char, int);

    struct S { TT t; }
    struct S { char t1; int t2; }

This means that if you have an aggregate that is a tuple (and tuples 
are, of course, aggregates) you have an aggregate that needs one 
alignment in one context, and another alignment in another. It doesn't work.



More information about the Digitalmars-d mailing list