Subject: Re: [boost] [Range] Confusing result of iterator_range::size()
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-11-05 16:23:08
on Sat Nov 05 2011, Olaf van der Spek <ml-AT-vdspek.org> wrote:
> On Sat, Nov 5, 2011 at 4:26 AM, Dave Abrahams <dave_at_[hidden]> wrote:
>> on Fri Nov 04 2011, Olaf van der Spek <ml-AT-vdspek.org> wrote:
>>> On Fri, Nov 4, 2011 at 11:02 AM, Thorsten Ottosen
>>> <thorsten.ottosen_at_[hidden]> wrote:
>>>>> My concern was about a.size()< Â b.size() where one size() returns a
>>>>> signed type and the other an unsigned type.
>>>> Yes, that happens a lot in C++. Not much we can do about it.
>>> We could ensure all size() return an unsigned type.
>> Yes, that is already part of the container requirements, which would
>> otherwise be refinements of the range requirements.
> 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.
-- 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