Boost logo

Boost :

From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2006-02-03 08:26:32


David Abrahams wrote:
> Thorsten Ottosen <tottosen_at_[hidden]> writes:
>
>
>>Eric Niebler wrote:
>>

>>right, but do you also waht sort() to return the sorted range?
>
>
> Yes, but as a "reference" to the original, i.e. a boost::range
> iterator bundle.

I assume you mean iterator_range< range_iterator<Rng>::type >
or something similar.

>>>There are lots more issues with range algorithms that have not been
>>>discussed yet. What about algorithms that accept an output iterator and
>>>write into it? Will they now take an output range?
>>
>>My say would be no. We still have the concept of an unbounded iterator.
>
>
> There is also the issue of O(1) size, for which you have not got
> support in your concept hierarchy.

Did I forget to mention this? Anyway, size() is now O(1). If you want
a generic version, dictance(rng) is supplied instead.

> And then there's property maps.

How do they relate to this?

>>>And what does br::copy return? You might think the answer is easy: the
>>>range designating the unused elements at the end of the second range.
>>>But what if br::copy is range-checked and truncates? That return value
>>>is no longer sufficient -- if br::copy returns an empty range, did the
>>>algorithm truncate, or did it all just fit?
>>
>>I'd be quite happy with copy returning void.
>
>
> I think that's a mistake.

What do you want it to return then?

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk