On Friday, 27 May 2016 at 14:48:59 UTC, Adam D. Ruppe wrote:
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.
float f; if(f is float.init) "float init".writeln; f = float.nan; if(f is float.init) "float nan".writeln;