On 07/20/2012 11:16 AM, David C. Rankin wrote:
On 07/20/2012 01:18 AM, Timothy Pearson wrote:
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
Tim,
With the daisy-chain of includes:
In file included from /opt/trinity/include/kfileitem.h:31:0,
from ../Panel/listpanel.h:37,
from expander.cpp:20:
Can I just try patching expander with the include, or do I need to patch
kfileitem.h and rebuild kdelibs first or somewhere else? Since everything else
built fine, I'll start with expander.cpp and go from there.
If you have a better idea, let me know :)
Tim,
I tried patching expander.cpp as follows:
#include <algorithm>
#include <iterator>
#include "expander.h"
Including '#include <iterator>' made no difference to the error. I'll
need
help on this one. I don't know what is failing. Full error is:
g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/trinity/include -I/opt/tqt3/include -I.
-include tqt.h -DQT_THREAD_SUPPORT -D_REENTRANT -D_LARGEFILE64_SOURCE
-DKDE_NO_COMPAT -DQT_NO_ASCII_CAST -Wno-long-long -Wundef -ansi
-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W
-Wpointer-arith -fno-builtin -g3 -fno-inline -march=i686 -mtune=generic -O2
-pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
-Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor
-fno-exceptions -fno-check-new -fno-common -I/usr/include/tqt -MT expander.o
-MD -MP -MF .deps/expander.Tpo -c -o expander.o expander.cpp
In file included from /opt/trinity/include/kfileitem.h:31:0,
from ../Panel/listpanel.h:37,
from expander.cpp:21:
/opt/trinity/include/kfilemetainfo.h:1237:34: warning: type qualifiers ignored
on function return type [-Wignored-qualifiers]
In file included from
/usr/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_algobase.h:66:0,
from
/usr/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../../include/c++/4.7.1/algorithm:62,
from expander.cpp:13:
/usr/lib/gcc/i686-pc-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/i686-pc-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/i686-pc-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:675:102: required from here
/usr/lib/gcc/i686-pc-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/i686-pc-linux-gnu/4.7.1/../../../../include/c++/4.7.1/algorithm:63:0,
from expander.cpp:13:
/usr/lib/gcc/i686-pc-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:675:102: required from here
/usr/lib/gcc/i686-pc-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/i686-pc-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/i686-pc-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_algobase.h:66:0,
from
/usr/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../../include/c++/4.7.1/algorithm:62,
from expander.cpp:13:
/usr/lib/gcc/i686-pc-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/i686-pc-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
--
David C. Rankin, J.D.,P.E.