错误在标准库?? /usr/include/g++-3/stl_algobase.h
c++ -DHAVE_CONFIG_H -I. -I. -I.. -O2 -O0 -g3 -Wall -fno-exceptions -fno-check-new -c msnuser2.cpp
In file included from msnuser.h:11,
from msnuser2.cpp:1:
chat.h:93:6: warning: no newline at end of file
chat.h:93:6: warning: no newline at end of file
/usr/include/g++-3/stl_algobase.h: In function `_OutputIter copy
(_InputIter, _InputIter, _OutputIter) [with _InputIter = CanShu **,
_OutputIter = CanShu **]':
/usr/include/g++-3/stl_algobase.h:184: template instantiation depth
exceeds maximum of 17 (use -ftemplate-depth-NN to increase the maximum)
instantiating `struct iterator_traits'
/usr/include/g++-3/stl_algobase.h:184: instantiated from `copy (_InputIter, _InputIter, _OutputIter) [with _InputIter = CanShu **, _OutputIter = CanShu **]'
/usr/include/g++-3/stl_deque.h:1629: instantiated from `deque::_M_reallocate_map (unsigned int, bool) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'
/usr/include/g++-3/stl_deque.h:925: instantiated from `deque::_M_reserve_map_at_front (unsigned int) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'
/usr/include/g++-3/stl_deque.h:1580: instantiated from `deque::_M_new_elements_at_front (unsigned int) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'
/usr/include/g++-3/stl_deque.h:898: instantiated from `deque::_M_reserve_elements_at_front (unsigned int) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'
/usr/include/g++-3/stl_deque.h:1256: instantiated from `deque::insert (typename _Deque_base::iterator, _ForwardIterator, _ForwardIterator, forward_iterator_tag) [with _ForwardIterator = _Deque_iterator, _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'
/usr/include/g++-3/stl_deque.h:791: instantiated from `deque::_M_insert_dispatch (typename _Deque_base::iterator, _InputIterator, _InputIterator, __false_type) [with _InputIterator = _Deque_iterator, _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'
/usr/include/g++-3/stl_deque.h:778: instantiated from `deque::insert (typename _Deque_base::iterator, _InputIterator, _InputIterator) [with _InputIterator = _Deque_iterator, _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'
/usr/include/g++-3/stl_deque.h:621: instantiated from `deque::operator= (const deque &) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'
/usr/include/g++-3/stl_algobase.h:139: instantiated from `__copy (_RandomAccessIter, _RandomAccessIter, _OutputIter, random_access_iterator_tag, _Distance *) [with _RandomAccessIter = _Deque_iterator, _OutputIter = _Deque_iterator, _Distance = ptrdiff_t]'
/usr/include/g++-3/stl_algobase.h:161: instantiated from `__copy_dispatch::copy (_InputIter, _InputIter, _OutputIter) [with _InputIter = _Deque_iterator, _OutputIter = _Deque_iterator, _BoolType = __false_type]'
/usr/include/g++-3/stl_algobase.h:188: instantiated from `copy (_InputIter, _InputIter, _OutputIter) [with _InputIter = _Deque_iterator, _OutputIter = _Deque_iterator]'
/usr/include/g++-3/stl_deque.h:617: instantiated from `deque::operator= (const deque &) [with _Tp = Command, _Alloc = allocator, unsigned int __bufsiz = 0]'
/usr/include/g++-3/stl_algobase.h:139: instantiated from `__copy (_RandomAccessIter, _RandomAccessIter, _OutputIter, random_access_iterator_tag, _Distance *) [with _RandomAccessIter = _Deque_iterator, _OutputIter = _Deque_iterator, _Distance = ptrdiff_t]'
/usr/include/g++-3/stl_algobase.h:161: instantiated from `__copy_dispatch::copy (_InputIter, _InputIter, _OutputIter) [with _InputIter = _Deque_iterator, _OutputIter = _Deque_iterator, _BoolType = __false_type]'
/usr/include/g++-3/stl_algobase.h:188: instantiated from `copy (_InputIter, _InputIter, _OutputIter) [with _InputIter = _Deque_iterator, _OutputIter = _Deque_iterator]'
/usr/include/g++-3/stl_deque.h:617: instantiated from `deque::operator= (const deque &) [with _Tp = MsnUser, _Alloc = allocator, unsigned int __bufsiz = 0]'
msnuser2.cpp:565: instantiated from here
/usr/include/g++-3/stl_algobase.h:184: invalid use of undefined type
`struct iterator_traits'
/usr/include/g++-3/stl_iterator.h:101: forward declaration of `struct
iterator_traits'
/usr/include/g++-3/stl_algobase.h:186: template instantiation depth
exceeds maximum of 17 (use -ftemplate-depth-NN to increase the maximum)
instantiating `struct iterator_traits'
/usr/include/g++-3/stl_algobase.h:186: instantiated from `copy (_InputIter, _InputIter, _OutputIter) [with _InputIter = CanShu **, _OutputIter = CanShu **]'
/usr/include/g++-3/stl_deque.h:1629: instantiated from `deque::_M_reallocate_map (unsigned int, bool) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'
/usr/include/g++-3/stl_deque.h:925: instantiated from `deque::_M_reserve_map_at_front (unsigned int) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'
/usr/include/g++-3/stl_deque.h:1580: instantiated from `deque::_M_new_elements_at_front (unsigned int) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'
/usr/include/g++-3/stl_deque.h:898: instantiated from
...........
/usr/include/g++-3/stl_algobase.h:291: template argument 1 is invalid
/usr/include/g++-3/stl_algobase.h:291: template argument 3 is invalid
gmake: *** [msnuser2.o] Error 1
*** failed ***
怎么都试标准库里的 不是我的代码呢?
环境试linux ad server 3
这个代码在 redhat 7.3 freebsd 5.4 fc3.0 里面都没有问题的
在这里有这个问题