On 3/28/13, cal <callumena...@gmail.com> wrote:
> Just realized that format.d is able to figure it out, since it
> prints #{overlap...} for unions. I can use that code, which works
> regardless of protection. Thanks

Ah, I didn't even know .tupleof would contain .offsetof.

void main()
{
    static if (S.tupleof[0].offsetof == S.tupleof[1].offsetof)
        pragma(msg, "Union");
}

Reply via email to