
16 Oct
2009
16 Oct
'09
12:12 p.m.
Yes I figured it out immediately after posting. I tried fixing it by adding a duplicate instance in the vector before adding it to the tree, but the trouble with that seems to be that push_back()s that cause resize()s make the object invalid. So I guess a list is a better structure to hold objects for the lifetime of the avltree?
Or try deque if you just need to add and not erase. Anyway, why do you need Boost.Intrusive if you are going to copy the value? Isn't better to use std::set and forget Boost.Intrusive? Ion