
3 Nov
2011
3 Nov
'11
10:04 a.m.
On Thu, Nov 3, 2011 at 11:00 AM, Thorsten Ottosen <thorsten.ottosen@dezide.com> wrote:
Given that this has come up twice in the last month, I think it's worth discussing the fallout from such a change. If one were to redesign boost::iterator_range all over again, is there an argument *against* making size() return an unsigned type?
Well, it used to return an unsigned type. It was then changed because
What unsigned type?
iterator traits have no notion of unsigned types.
And , AFAICR, there was a discussion about this on the list, convincing me that using difference_type was the right thing to do.
AFAIK the conclusion was the opposite: use make_unsigned. -- Olaf