Boost logo

Boost :

Subject: Re: [boost] Is Boost.Range broken?
From: David Abrahams (dave_at_[hidden])
Date: 2008-11-23 02:04:28


on Sat Nov 22 2008, Tomas Puverle <Tomas.Puverle-AT-morganstanley.com> wrote:

> Scott,
>
>> But what semantics for empty *are* documented?
>>
>> http://www.boost.org/doc/libs/1_37_0/libs/range/doc/boost_range.html> #Semantics
>> empty(x) returns boost::begin(x) == boost::end(x)
>
> Prior to 1.35, the iterator_range<> documentation read the following:
>
> "Recall that many default constructed iterators are singular and hence can only
> be assigned, but not compared or incremented or anything. However, if one
> creates a default constructed iterator_range, then one can still call all its
> member functions. This means that the iterator_range will still be usable in
> many contexts even though the iterators underneath are not. "
>
> Does this answer your question?

Finally, it answers mine. Now the question is: whose code will remain
broken? Those who used iterator_range prior to 1.35 and relied on this
feature, or those who used it after 1.35 and expect not to incur space
and time overhead to support it?

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk