
Scott McMurray skrev:
On Sun, Nov 23, 2008 at 13:06, Daniel Walker <daniel.j.walker@gmail.com> wrote:
On Sun, Nov 23, 2008 at 1:49 AM, David Abrahams <dave@boostpro.com> wrote: <snip>
Frankly, you don't even need to be that explicit: just write the semantics of empty as
begin(r) == end(r) That was the definition of the semantics of empty(r) before it was (inexplicably) removed from the Range concept.
And despite not being mentioned in the concept (http://www.boost.org/doc/libs/1_37_0/libs/range/doc/range.html#single_pass_r... and boost/range/concepts.hpp), it's still in the Semantics section of the "Synopsis and Reference" page (http://www.boost.org/doc/libs/1_37_0/libs/range/doc/boost_range.html#Semanti...).
In fact, why does iterator_range have a public empty() method at all? It's modelling a range, so boost::empty will use boost::begin and boost::end, completely ignoring iterator_range<T>::empty. Making ir.empty() just sugar for boost::empty(ir) seems the only reasonable way to avoid consistency problems. (Removing the member altogether would be nice, but it's probably too late for that.)
We are going way to much in detail here. All these matters where settled at the initial design and review. I belive it was for convinience. I suggest that we direct our time at other topics. -Thorsten