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

Dicebot public at dicebot.lv
Sat Sep 21 06:54:58 PDT 2013


On Saturday, 21 September 2013 at 13:48:00 UTC, simendsjo wrote:
> 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 :)

I am not sure those differ even at compiler level (other than at 
syntax stage) - why would you need it?


More information about the Digitalmars-d-learn mailing list