求助啊,每次运行都显示已触发了一个断点,然后光标在红色行_DEBUG_ERROR("list iterator not dereferencable");
template<class _Mylist>
class _List_unchecked_iterator
: public _List_unchecked_const_iterator<_Mylist>
{ // unchecked iterator for mutable list
public:
typedef _List_unchecked_iterator<_Mylist> _Myiter;
typedef _List_unchecked_const_iterator<_Mylist> _Mybase;
typedef bidirectional_iterator_tag iterator_category;
typedef typename _Mylist::_Nodeptr _Nodeptr;
typedef typename _Mylist::value_type value_type;
typedef typename _Mylist::difference_type difference_type;
typedef typename _Mylist::pointer pointer;
typedef typename _Mylist::reference reference;
_List_unchecked_iterator()
{ // construct with null node
}
_List_unchecked_iterator(_Nodeptr _Pnode, const _Mylist *_Plist)
: _Mybase(_Pnode, _Plist)
{ // construct with node pointer _Pnode
}
reference operator*() const
{ // return designated value
return ((reference)**(_Mybase *)this);
}
pointer operator->() const
{ // return pointer to class object
return (&**this);
}
_Myiter& operator++()
{ // preincrement
++(*(_Mybase *)this);
return (*this);
}
_Myiter operator++(int)
{ // postincrement
_Myiter _Tmp = *this;
++*this;
return (_Tmp);
}
_Myiter& operator--()
{ // predecrement
--(*(_Mybase *)this);
return (*this);
}
_Myiter operator--(int)
{ // postdecrement
_Myiter _Tmp = *this;
--*this;
return (_Tmp);
}
};
// TEMPLATE CLASS _List_const_iterator
template<class _Mylist>
class _List_const_iterator
: public _List_unchecked_const_iterator<_Mylist, _Iterator_base>
{ // iterator for nonmutable list
public:
typedef _List_const_iterator<_Mylist> _Myiter;
typedef _List_unchecked_const_iterator<_Mylist, _Iterator_base> _Mybase;
typedef bidirectional_iterator_tag iterator_category;
typedef typename _Mylist::_Nodeptr _Nodeptr;
typedef typename _Mylist::value_type value_type;
typedef typename _Mylist::difference_type difference_type;
typedef typename _Mylist::const_pointer pointer;
typedef typename _Mylist::const_reference reference;
_List_const_iterator()
: _Mybase()
{ // construct with null node pointer
}
_List_const_iterator(_Nodeptr _Pnode, const _Mylist *_Plist)
: _Mybase(_Pnode, _Plist)
{ // construct with node pointer _Pnode
}
typedef _List_unchecked_const_iterator<_Mylist> _Unchecked_type;
_Myiter& _Rechecked(_Unchecked_type _Right)
{ // reset from unchecked iterator
this->_Ptr = _Right._Ptr;
return (*this);
}
_Unchecked_type _Unchecked() const
{ // make an unchecked iterator
return (_Unchecked_type(this->_Ptr, (_Mylist *)this->_Getcont()));
}
reference operator*() const
{ // return designated value
#if _ITERATOR_DEBUG_LEVEL == 2
if (this->_Getcont() == 0
|| this->_Ptr == 0
|| this->_Ptr == ((_Mylist *)this->_Getcont())->_Myhead)
{ // report error
_DEBUG_ERROR("list iterator not dereferencable");
_SCL_SECURE_OUT_OF_RANGE;
}
#elif _ITERATOR_DEBUG_LEVEL == 1
_SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
_SCL_SECURE_VALIDATE_RANGE(this->_Ptr !=
((_Mylist *)this->_Getcont())->_Myhead);
#endif /* _ITERATOR_DEBUG_LEVEL */
return (_Mylist::_Myval(this->_Ptr));
}
_Myiter& operator++()
{ // preincrement
#if _ITERATOR_DEBUG_LEVEL == 2
if (this->_Getcont() == 0
|| this->_Ptr == 0
|| this->_Ptr == ((_Mylist *)this->_Getcont())->_Myhead)
{ // report error
_DEBUG_ERROR("list iterator not incrementable");
_SCL_SECURE_OUT_OF_RANGE;
}
#elif _ITERATOR_DEBUG_LEVEL == 1
_SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
_SCL_SECURE_VALIDATE_RANGE(this->_Ptr !=
((_Mylist *)this->_Getcont())->_Myhead);
#endif /* _ITERATOR_DEBUG_LEVEL */
“duoAGVfenjian.exe”: 已加载“D:\研究生\机器人\机器人副本\RobotSimulation-master - 副本\xiangmu\duoAGVfenjian\Debug\duoAGVfenjian.exe”,已加载符号。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\ntdll.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\kernel32.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\KernelBase.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\msvcp100d.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\msvcr100d.dll”,已加载符号。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\user32.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\gdi32.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\lpk.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\usp10.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\msvcrt.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\advapi32.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\sechost.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\rpcrt4.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\sspicli.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\cryptbase.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\imm32.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\msctf.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\uxtheme.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\dwmapi.dll”,已加载符号(去除源信息)。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\ole32.dll”,已加载符号。
“duoAGVfenjian.exe”: 已加载“C:\Windows\SysWOW64\oleaut32.dll”,已加载符号(去除源信息)。
duoAGVfenjian.exe 已触发了一个断点
线程 '主线程' (0x1960) 已退出,返回值为 -1073741510 (0xc000013a)。
程序“[4216] duoAGVfenjian.exe: 本机”已退出,返回值为 -1073741510 (0xc000013a)。