_Iterator::iterator_category error

_Iterator::iterator_category error

When I tried to compile a software on an IA-64 machine using Intel C++ Compiler 10.0, I received the following error messages:

/usr/include/g++/bits/stl_iterator_base_types.h(126): error: name followed by "::" must be a class or namespace name

typedef typename _Iterator::iterator_category iterator_category;
^
detected during:
instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" at line 625 of "/usr/include/g++/bits/basic_string.h"
instantiation of
"std::basic_string<_CharT, _Traits, _Alloc> &std::basic_string<_CharT, _Traits, _Alloc>::replace(__gnu_cxx::__normal_iterator<_Alloc::pointer, std::basic_string<_CharT, _Traits, _Alloc>>, __gnu_cxx::__normal_iterator<_Alloc::pointer, std::basic_string<_CharT, _Traits, _Alloc>>, _InputIterator, _InputIterator) [with _CharT=fst::StdArc::Label={int}, _Traits=std::char_traits, _Alloc=std::allocator, _InputIterator=int]" at line 496 of "/usr/include/g++/bits/basic_string.h"

Does anyone knows how I can solve this problem?
Thank you very much.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

which OS? can you attach the code snippet? I don't see the error on EL5.

Hi, thank you so much for your response.

OS is SUSE LINUX Enterprise Server 9 (ia64).
Kernel is Linux cse 2.6.5-7.283-sn2.
GCC version is 3.3.3.
Machine is SGI Altix.

Full error messages are as follows:

/usr/include/g++/bits/stl_iterator_base_types.h(130): error: name followed by "::" must be a class or namespace name
typedef typename _Iterator::reference reference;
^
detected during:
instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" at line 625 of "/usr/include/g++/bits/basic_string.h"
instantiation of
"std::basic_string<_CharT, _Traits, _Alloc> &std::basic_string<_CharT, _Traits, _Alloc>::replace(__gnu_cxx::__normal_iterator<_Alloc::pointer, std::basic_string<_CharT, _Traits, _Alloc>>, __gnu_cxx::__normal_iterator<_Alloc::pointer, std::basic_string<_CharT, _Traits, _Alloc>>, _InputIterator, _InputIterator) [with _CharT=fst::StdArc::Label={int}, _Traits=std::char_traits, _Alloc=std::allocator, _InputIterator=int]" at
line 496 of "/usr/include/g++/bits/basic_string.h"
instantiation of "void std::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT=fst::StdArc::Label={int}, _Traits=std::char_traits, _Alloc=std::allocator]" at line 156 of "../../fst/lib/synchronize.h"
instantiation of "const std::basic_string, std::allocator> *fst::SynchronizeFstImpl::Cdr(const std::basic_string, std::allocator> *, A::Label) [with A=fst::StdArc]" at line 217 of "../../fst/lib/synchronize.h"
instantiation of "void fst::SynchronizeFstImpl::Expand(A::StateId) [with A=fst::StdArc]" at line 120 of "../../fst/lib/synchronize.h"
instantiation of "size_t={unsigned long} fst::SynchronizeFstImpl::NumArcs(A::StateId) [with A=fst::StdArc]" at line 347 of "../../fst/lib/synchronize.h"
instantiation of "size_t={unsigned long} fst::SynchronizeFst::NumArcs(A::StateId) const [with A=fst::StdArc]" at line 335 of "../../fst/lib/synchronize.h"
instantiation of "fst::SynchronizeFst::SynchronizeFst(const fst::Fst &, const fst::SynchronizeFs
tOptions &) [with A=fst::StdArc]" at line 454 of "../../fst/lib/synchronize.h"
instantiation of "void fst::Synchronize(const fst::Fst &, fst::MutableFst *) [with Arc=fst::StdArc]" at line 40 of "../../fst/bin/synchronize-main.h"
instantiation of "int fst::SynchronizeMain(int, char **, std::istream &, const fst::FstReadOptions &) [with Arc=fst::StdArc]" at line 25 of "fstsynchronize.cc"

You can download this software from http://www.openfst.org/.

Leave a Comment

Please sign in to add a comment. Not a member? Join today