handful and interval
David Nadlinger
see at klickverbot.at
Sun Sep 2 07:50:39 PDT 2012
On Sunday, 2 September 2012 at 14:42:43 UTC, Alex Rønne Petersen
wrote:
> On 02-09-2012 16:22, Andrei Alexandrescu wrote:
>> int x;
>> ...
>> if (x in interval(1, 2))
>> {
>> ...
>> }
>
> I don't deal much in this sort of code, but I can see it being
> useful (it's certainly prettier than writing the checks out
> manually). I don't really know what else I would expect from
> such a type, though.
Hm, maybe assert(interval(1, 3) & interval(2, 4) == interval(2,
3)) and similar operations?
David
More information about the Digitalmars-d
mailing list