c++.stlsoft - [stlsoft-1.9.32] Bug in pod_vector::erase(iterator it)
- =?UTF-8?B?Q2hyaXN0aWFuIFLDtnNzZWw=?= (10/10) Jun 11 2008 Hello,
- Matthew Wilson (5/15) Jun 12 2008 Thanks for letting me know. I'll fix this and add to next 1.9.x release
- =?UTF-8?B?Q2hyaXN0aWFuIFLDtnNzZWw=?= (17/44) Jun 18 2008 for? Thanks
Hello, I found a bug in pod_vector::erase(iterator it). Instead of moving all elements right of iterator it, only one element is moved. One possible fix is to relpace the line (pod_vector.hpp line 1195) pod_move_n(&it[0], &it[1], 1); with pod_move_n(&it[0], &it[1], end() - it - 1); I'm using stlsoft-1.9.32. Thanks for the library and regards, Christian
Jun 11 2008
Thanks for letting me know. I'll fix this and add to next 1.9.x release Cheers Matt P.S. May I ask where you heard about STLSoft, and what you're using it for? Thanks "Christian Rössel" <christian.roessel gmx.de> wrote in message news:g2o0ur$1o6g$1 digitalmars.com...Hello, I found a bug in pod_vector::erase(iterator it). Instead of moving all elements right of iterator it, only one element is moved. One possible fix is to relpace the line (pod_vector.hpp line 1195) pod_move_n(&it[0], &it[1], 1); with pod_move_n(&it[0], &it[1], end() - it - 1); I'm using stlsoft-1.9.32. Thanks for the library and regards, Christian
Jun 12 2008
Matthew Wilson schrieb:Thanks for letting me know. I'll fix this and add to next 1.9.x release==20 Cheers =20 Matt =20 P.S. May I ask where you heard about STLSoft, and what you're using it =for? Thanks I heard about STLSoft in one of your articles published in Dr. Dobbs or CUJ, I don't remember exactly which article. Currently I'm using only pod_vector from STLSoft. I use it as a replaceme= nt of std::vector if I need to clear the container frequently. In our traffi= c simulation, every vehicle collects every timestep it's neighbour vehicles= in several vectors, mostly using push_back. These vectors have to be cleared before the next timestep begins. Using pod_vector resulted in a 1= 5% overall speedup compared to std::vector, using VisualStudio 2005. Great! Regards, Christian"Christian R=EF=BF=BDssel" <christian.roessel gmx.de> wrote in message =news:g2o0ur$1o6g$1 digitalmars.com...Hello, I found a bug in pod_vector::erase(iterator it). Instead of moving all=fixelements right of iterator it, only one element is moved. One possible=is to relpace the line (pod_vector.hpp line 1195) pod_move_n(&it[0], &it[1], 1); with pod_move_n(&it[0], &it[1], end() - it - 1); I'm using stlsoft-1.9.32. Thanks for the library and regards, Christian=20 =20 =20
Jun 18 2008