Boost logo

Boost :

Subject: Re: [boost] [Range] Confusing result of iterator_range::size()
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2011-11-07 16:33:01


> Den 05-11-2011 21:23, Dave Abrahams skrev:
> >
> > on Sat Nov 05 2011, Olaf van der Spek<ml-AT-vdspek.org> wrote:
>
> >> So boost::iterator_range::size() and boost::size() violate this?
> >
> > I don't have the spec in front of me, but that's my understanding from
> > the foregoing conversation.
>
> Well, iterator_range<T> is not a container. Could you elaborate on your
> view?

I think Dave's trying to say that if the size() of a range in a signed
type, but the size() of a container is an unsigned type, then the container
concept fails to be a refinement of the range concept, which it should be.

Regards,
Nate
                                               


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