Subject: Re: [boost] [Boost-users] [Review] ITL review starts today, February 18th
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2010-03-05 07:38:24
2010/3/4 John Reid <j.reid_at_[hidden]>:
> Joachim Faulhaber wrote:
>> 2010/3/4 John Reid <j.reid_at_[hidden]>:
>>>>> The default interval type is closed. Isn't right-open a more natural
>>>>> 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
>>> make the distance between intervals available when the domain is
>>> This would be similar to the availability of first and last when the
>>> 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.
> For my uses I would like to see a method to calculate the distance between 2
> intervals available when the domain supports it. I feel many users are going
> to write this functionality themselves. Also a method to return the gap
> between 2 intervals would be useful. Just my 2 cents.
I dont't have a problem adding these functions.