string_algo and vector

Dear all, the documetnation was alittle bit vague about the use of other sequences with string_algo. However I would expect that a vector and a string have many similarities, but still I got a crash when using a vector (with Visual Studio 2003, Boost 1.36): void Foo() { //crashes with vector: std::vector<int> v1 = boost::assign::list_of(1)(3)(5)(7)(9); std::vector<int> v2 = boost::assign::list_of(3)(5); boost::algorithm::erase_range(v1, v2); _ASSERT(v1.size() == 3); //crash in detructor of v2 when leaving scope } anyone idea? wkr, me

forgot the spam, erase_range requires that the iterators are coming from the same sequence. However it doesn't add much value, since the member function erase (on string, vector) does the same?

btw. erase_all does the trick (erasing from a second range), if anyone is interested.
participants (1)
-
gast128