www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Interval type

reply "simendsjo" <simendsjo gmail.com> writes:
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?
Mar 03 2013
parent "bearophile" <bearophileHUGS lycos.com> writes:
simendsjo:

 Is my memory playing tricks on me?
Right, I think. Bye, bearophile
Mar 03 2013