Well this is the section of code located on list.h that apparently is making my code break:
Code:
304: #if _HAS_ITERATOR_DEBUGGING
305: void _Compat(const _Myt_iter& _Right) const
306: { // test for compatible iterator pair
307: if (this->_Mycont == 0 || this->_Mycont != _Right._Mycont)
308: {
309: _DEBUG_ERROR("list iterators incompatible");
310: _SCL_SECURE_TRAITS_INVALID_ARGUMENT;
311: }
312: }
313: #else /* _HAS_ITERATOR_DEBUGGING */
314: protected:
315: #endif /* _HAS_ITERATOR_DEBUGGING */
316: _Nodeptr _Ptr; // pointer to node
317: };
it also breaks before entering the while loop for the first time