March 03, 2013 Interval type | ||||
|---|---|---|---|---|
| ||||
I seem to remember phobos has an interval type so you can specify:
Interval!("(]", 0, 10) myvalue;
Interval!("(0,10]") myvalue; // or perhaps like this..
and get
enforce(value > 0 && value <= 10);
added automatically.
I'm unable to find it though.. Is my memory playing tricks on me?
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply