Boost logo

Boost :

Subject: Re: [boost] [Range] Confusing result of iterator_range::size()
From: Olaf van der Spek (ml_at_[hidden])
Date: 2011-11-03 06:04:18

On Thu, Nov 3, 2011 at 11:00 AM, Thorsten Ottosen
<thorsten.ottosen_at_[hidden]> wrote:
>> Given that this has come up twice in the last month, I think it's worth
>> discussing the fallout from such a change.  If one were to redesign
>> boost::iterator_range all over again, is there an argument *against*
>> making
>> size() return an unsigned type?
> Well, it used to return an unsigned type. It was then changed because

What unsigned type?

> iterator traits have no notion of unsigned types.

> And , AFAICR, there was a discussion about this on the list, convincing me
> that using difference_type was the right thing to do.

AFAIK the conclusion was the opposite: use make_unsigned.


Boost list run by bdawes at, gregod at, cpdaniel at, john at