3 Aug
2008
3 Aug
'08
12:22 p.m.
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!