Boost logo

Boost :

Subject: Re: [boost] [Range] Confusing result of iterator_range::size()
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2011-11-03 09:51:31


Den 03-11-2011 13:16, Olaf van der Spek skrev:

>> If you can find it, I might believe you. It should be in the archieves from
>> some years ago.
>
> I meant the discussion last month.
> Didn't know it was discussed before. Do you have any idea in what year/month?

A couple of years maybe. I think it happened at the same time we
demanded that size(Rng) only worked for RandomAccessRanges and that this
function also returns a signed type.

Using the old docs, one can probably track down the approximate time.

The bottom line is that it was a deliberate decision. The example put
forward

   std::min(bbb.size(), (size_t)arr.size());

is not portable either.

-Thorsten


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