|
Boost Users : |
From: Igor R (boost.lists_at_[hidden])
Date: 2008-08-03 08:22:39
Hi,
What would be the shortest way to subtract 2 containers?
multi_index_container
<
// ordered key
>
cont1, cont2;
cont1.insert(a);
cont1.insert(b);
cont1.insert(c);
cont2.insert(b);
// here I'd like to do cont1 -= cont2, so that cont1 would contain (a,c)
Obviously, the operator -() or -=() is unsupported. So is there a way
to do this without an explicit loop? IIUC, std::remove_if() wouldn't
work here, because it tries to rearrange the elements...
Thank you!
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net