[Issue 13010] Use variable range propagation (VRP) for static assert

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Feb 28 06:25:06 PST 2015


https://issues.dlang.org/show_bug.cgi?id=13010

--- Comment #8 from Lionello Lunesu <lio+bugzilla at lunesu.com> ---
(In reply to David Nadlinger from comment #7)
> I'm not sure whether this is worth the added language complexity. Do you
> have an example for a compelling use case?

Statically testing the range of a variable:

ubyte u;
static assert(u >= 0);

--


More information about the Digitalmars-d-bugs mailing list