struct default constructor, unions and bizaro behavior.

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 11 15:15:27 PST 2014


On Thursday, 11 December 2014 at 16:20:33 UTC, Steven
Schveighoffer wrote:
> 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

I ran into this issue because of another bug that prevent the
default constructor to be found in some template mixin madness
piece of code :)

Anyway, I think this is reasonable to have one element for the
union in the tupleof as well.


More information about the Digitalmars-d mailing list