Boost logo

Boost :

Subject: Re: [boost] [Boost-users] [Review] ITL review starts today, February 18th
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2010-03-04 12:36:29

2010/3/4 John Reid <j.reid_at_[hidden]>:
>>> The default interval type is closed. Isn't right-open a more natural
>>> choice
>>> for most applications?
>> Good question ... I tried to change this in the past but encountered
>> problems with unsigned integral domain types that flipped to max_int
>> by singular applications of decrement operator -- in the current
>> implementation. May be I should check this point more thoroughly
>> again. I could get rid of the unloved unon<T>() meta function. ...
> You seem to suggest you apply operator-- on integral domains here. Why not
> make the distance between intervals available when the domain is integral?
> This would be similar to the availability of first and last when the domain
> is discrete.

For all of the interval functions it turns out, that the functionality
that I offer, which does not include interval arithmetics, only needs
very few basic operations: <, ++, and -- on the the bound members of
type domain_type. This keeps the requirements on my Interval parameter
minimal and allows for a greater class of instance_types for parameter

I know, that I am not completely consequent here. Functions length()
and cardinality() use operator - . But if you don't need to call them,
you can work with more primitive domain_type.

Regards, Joachim

Boost list run by bdawes at, gregod at, cpdaniel at, john at