Thomas <ad-tw@versanet.de> wrote:
I crash in the _Const_iterator::operator==(const _Myt_iter& _Right)
const _SCL_SECURE_TRAITS_VALIDATE(this->_Mycont != NULL &&
this->_Mycont == _Right._Mycont);
I use a GTL (graph template library) based on STL, I port the Dll to
VS2005, I can compile it but I crash during runtime.
I switched it off via #define _SECURE_SCL 0 and it works.
Are you using list::swap method by any chance? The new iterator
debugging code has every iterator remember what container it is an
iterator of. Here in comparison operator, the assertion checks that
the two iterators being compared actually come from the same
container.
When you call swap() method to swap the internals of the two
containers, iterators on one container start pointing into the other
and vice versa. I've seen reports that the iterator's reference back
to its container is not updated in this case, so the iterator thinks
it points into one container while in reality it points into another.
I know that's true for std::vector iterators. Not sure about std::list, but
it might affect them as well.