Boost logo

Boost :

From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2002-07-19 17:26:46

----- Original Message -----
From: "Aleksey Gurtovoy" <agurtovoy_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, July 20, 2002 12:02 AM
Subject: RE: [boost] mpl::erase with vector_c

> That's not a bug - 'list' does not support 'push_back', because it's not
> possible to implement it in the way that would satisfy the algorithm's
> complexity requirements - see
> and

The problem is that this breaks the orthogonality between algorithms and
containers. That is, I can't write an algorithm that works with both vectors
and lists (or I have to specialize it so that it uses different codepaths).
Which is not what I'd expect.

> FWIW, 'copy_if' + 'push_back' is equivalent to 'copy_backward_if' +
> 'push_front'.

Yes, I had this workaround already in place :)

Giovanni Bajo

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