|
Boost : |
Subject: Re: [boost] difference_type size()?
From: Olaf van der Spek (ml_at_[hidden])
Date: 2011-10-19 15:40:35
On Wed, Oct 19, 2011 at 9:31 PM, Jeffrey Lee Hellrung, Jr.
<jeffrey.hellrung_at_[hidden]> wrote:
> Yes. Changing iterator_traits (specifically, the collection of types
> associated with an iterator) is where I'm leaning, if you really want an
> unsigned iterator_range::size().
If you've got another / better solution for the signed/unsigned
mismatches that result from a signed size() I'd be happy to hear it
from you.
>
>> What would the problem be of just using std::size_t?
>>
>
> Well, likewise, what would be the problem of always using std::ptrdiff_t for
> difference_type? And, aside from whether std::size_t would be wide enough,
How is difference_type relevant?
> I don't think there are any requirements that std::size_t be constructable
> from difference_type.
-- Olaf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk