On 07/15/2012 12:43 AM, David C. Rankin wrote:
Tim, Darrell, All,
krusader still fails to build and gives a template error. With gcc 4.7.0 the thought was maybe it was a gcc issue. Now we are on 4.7.1 and the gcc bugs should be pretty much worked out. However, I still get the iterator error in 'class TQValueListConstIterator<KURL>'. I know nothing about the template classes, so this will be impossible for me to debug. Need help. The full error is:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_iterator_base_types.h: In instantiation of 'struct std::iterator_traits<TQValueListConstIterator<KURL> >': /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_iterator_base_types.h:202:5: required by substitution of 'template<class _Iter> typename std::iterator_traits::iterator_category std::__iterator_category(const _Iter&) [with _Iter = TQValueListConstIterator<KURL>]' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_algo.h:4490:41: required from '_IIter std::find_if(_IIter, _IIter, _Predicate) [with _IIter = TQValueListConstIterator<KURL>; _Predicate = std::unary_negate<std::const_mem_fun_ref_t<bool, KURL> >]' expander.cpp:674:102: required from here /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_iterator_base_types.h:166:53: error: no type named 'iterator_category' in 'class TQValueListConstIterator<KURL>' In file included from /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/algorithm:63:0, from expander.cpp:13: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_algo.h: In instantiation of '_IIter std::find_if(_IIter, _IIter, _Predicate) [with _IIter = TQValueListConstIterator<KURL>; _Predicate = std::unary_negate<std::const_mem_fun_ref_t<bool, KURL> >]': expander.cpp:674:102: required from here /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_algo.h:4490:41: error: no matching function for call to '__iterator_category(TQValueListConstIterator<KURL>&)' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_algo.h:4490:41: note: candidate is: In file included from /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_algobase.h:66:0, from /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/algorithm:62, from expander.cpp:13: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_iterator_base_types.h:202:5: note: template<class _Iter> typename std::iterator_traits::iterator_category std::__iterator_category(const _Iter&) /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_iterator_base_types.h:202:5: note: substitution of deduced template arguments resulted in errors seen above
Guys,
These template errors seem to point back to the TQValueList... template stuff that I'm having a bit more trouble with. As with kima, this looks like it might be a simple missing include as in 'kima' (#include <list>). But, what include would go along with __iterator_category(TQValueListConstIterator<KURL>&)?? Is there an (#include <iterator>) STL include?
-- David C. Rankin, J.D.,P.E.
Yes there is, but I don't know if it will help you: http://www.cplusplus.com/reference/std/iterator/iterator/
If this does end up being needed, a patch to Qt3/TQt3 itself may be needed.
Tim