On Wed, 21 Jul 2010 17:00:35 -0400, Michel Fortin
<[email protected]> wrote:
On 2010-07-21 13:00:56 -0400, Peter Alexander
<[email protected]> said:
An example of an algorithm that would take a cursor is
insertBefore. There is no reason for it to accept a range, because
you are not traversing elements. You just want to insert something
before some single point in the range.
From what I understand, you'd like something like this to work:
auto range = container[];
auto sortOfIterator = range.front;
container.insertBefore(sortOfIterator);
From dcollections:
auto range = container[];
auto cursor = range.begin;
container.insert(cursor, value);
Note that insertBefore is reduced to insert, because the ambiguity is gone
(there is only one element in a cursor, so it's obvious where you are
inserting).
-Steve