Subject: Re: [boost] [Range] Confusing result of iterator_range::size()
From: Olaf van der Spek (ml_at_[hidden])
Date: 2011-11-03 05:32:10
On Thu, Nov 3, 2011 at 9:54 AM, Thorsten Ottosen
>>> I think the end result was an agreement that
>>> typedef typename boost::make_unsigned< difference_type>::type size_type
>>> would be a valid definition of size_type, so the only argument against
>>> making the change that I can see is breaking existing code (probably
>>> unlikely...?) and...inertia.
> Well, its /not/ unlikely that it will break code.
>> I did not find authors of "Range" in the discussion. I am afraid your fix
>> be missed. It is good idea to write formal bug. Can you do it?
> I think the most obvious reason we (probabl me) did it like that is that
> iterator traits have no notion of unsigned types.
Maybe you could you provide a new class, ptr_range?
I'd derive from iterator_range, use ::std::size_t for size() and
provide a data() member?
It's only a partial solution.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk