Subject: Re: [boost] difference_type size()?
From: Olaf van der Spek (ml_at_[hidden])
Date: 2011-10-19 13:03:25
On Wed, Oct 19, 2011 at 7:01 PM, pavel <paul.cpprules_at_[hidden]> wrote:
> Olaf wrote on Wednesday, October 19, 2011 at 1:30:03:
>> iterator_range returns a signed size. Is this correct?
>> IMO it should return size_t.
> given two arbitrary valid random access iterators (from one range) let
> you know the distance between them
> it is either positive or negative (or 0) dependent on the order of the
> given iterators
> i'd say difference type should be ptrdiff_t in the general case
We're not talking about difference_type.
We're talking about the return type of size().
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk