Boost logo

Boost :

Subject: Re: [boost] difference_type size()?
From: Rhys Ulerich (rhys.ulerich_at_[hidden])
Date: 2011-10-18 19:45:43

> iterator_range returns a signed size. Is this correct?
> IMO it should return size_t.
> boost\range\iterator_range_core.hpp:
> difference_type size() const
> {
> return m_End - m_Begin;
> }

Random thought: It seems like advance_begin and advance_end could be
used to create a strictly negative size. Returning difference_type
allows this to be detected while a size_type does not.

- Rhys

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