On 12/10/14 4:57 PM, deadalnix wrote:
struct S {
      union {
          T1 t1;
          T2 t2;
      }

      T3 t3;
}

T1 a1;
T3 a3;
S(a1, a3);

This is erroring because t1 is set twice. It turns out that the
second parameter of the struct map to t2 rather than t3.

This behavior do not make any sense, ever. Why is that the
default ?

I'm not sure it's reasonable to expect this much out of the compiler-generated default ctor. It probably just does the equivalent of this.tupleof[0..args.length] = args;

Can't you just add a constructor for it?

-Steve

Reply via email to