Boost logo

Boost :

Subject: Re: [boost] Is Boost.Range broken?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-11-24 23:20:39


AMDG

Tomas Puverle wrote:
>> The default-constructed state of a string class is a perfectly valid
>> state, that's totally unrelated.
>>
>
> My point was that a default constructed range may be in a perfectly valid
> state, too, depending on its iterators.
>

Indeed. I think that a default constructed iterator_range should be
usable and empty
iff default constructed iterators are non-singular and equal. This
effectively
pushes dealing with default construction onto the iterators. IMO, this is
more consistent than the old behavior, where a default constructed
iterator_range was "empty", but r.begin() == r.end() could be undefined
behavior.

In Christ,
Steven Watanabe


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