Why do some T.init evaluate to true while others to false?

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 27 07:48:59 PDT 2016


On Friday, 27 May 2016 at 14:43:47 UTC, ArturG wrote:
>>     if(value is typeof(value).init) ...
>
> that still requiers a special case for floating points, arrays 
> and optionally empty string literals.

Have you tried? That should work in all cases.


More information about the Digitalmars-d-learn mailing list