________________________________________ De: boost-users-bounces@lists.boost.org [boost-users-bounces@lists.boost.org] En nombre de Igor R [boost.lists@gmail.com] Enviado el: domingo, 03 de agosto de 2008 14:22 Para: boost-users@lists.boost.org Asunto: [Boost-users] [boost-users][multi-index] subtracting containers
Hi,
What would be the shortest way to subtract 2 containers?
Hi Igor,
Excuse my late answering, I'm away on vacation and with little access to Internet.
Your problem is not particualrly related to Boost.MultiIndex, since it is entirely
analogous to the same issue as posed with std::sets. You can use
std::set_difference, but the interface of this function forces you yo create a
fresh copy with the result of the difference rather than doing the subtraction in place.
Another alternative would be to use std::for_each more or less like this:
typedef multi_index_container