Boost logo

Boost Users :

Subject: [Boost-users] string_algo and vector
From: gast128 (gast128_at_[hidden])
Date: 2009-06-04 04:32:17


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


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