Editions Ideas

Dom Disc dominikus at scherkl.de
Sun Jan 4 22:17:19 UTC 2026


On Sunday, 4 January 2026 at 22:11:55 UTC, Dom Disc wrote:
Damn it. Forget the case with bool. Should be:

```d
static @property template invalid(T) if(isNumeric!T)
{
    static if(isFloatingPoint!T)
       enum invalid = T.init;
    else static if(isSigned!T)
       enum invalid = T.min; // 0x80..00
    else // unsigned
       enum invalid = T.max; // 0xFF..FF
}
```

(and of course today it's not valid to write "static @property" 
before a template - this is what I wish would be changed)



More information about the Digitalmars-d mailing list