Is there a way to see if .init has been set by the user?

simendsjo simendsjo at gmail.com
Sat Sep 21 06:47:58 PDT 2013


On Saturday, 21 September 2013 at 13:38:44 UTC, Dicebot wrote:
> On Saturday, 21 September 2013 at 13:30:19 UTC, simendsjo wrote:
>> I'm though of using if for aggregates, yes. But this doesn't 
>> handle the case where you set the same value is T.init.
>
> I don't think those two case are any different from the type 
> system point of view, manual or default.

Need some __traits(hasUserSuppliedInit, T) then :)


More information about the Digitalmars-d-learn mailing list