From ff2968bd6004bdf1323c029ffad084003a432d7d Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Mon, 17 Feb 2003 10:19:25 +0000 Subject: [PATCH] Updated to use gcc-3.2 --- eo/configure.in | 2 +- eo/src/gp/eoParseTree.h | 4 +++- eo/src/gp/eoParseTreeDepthInit.h | 6 +++--- eo/src/gp/eoParseTreeOp.h | 2 +- eo/src/gp/parse_tree.h | 18 +++++++++--------- eo/src/utils/eoParam.h | 2 +- eo/test/t-eoPareto.cpp | 2 +- eo/test/t-eoSelect.cpp | 4 ++-- 8 files changed, 21 insertions(+), 19 deletions(-) diff --git a/eo/configure.in b/eo/configure.in index 90de61241..1fcca74b3 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -34,5 +34,5 @@ AC_TYPE_SIZE_T dnl Checks for library functions. AC_CHECK_FUNCS(select) -AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile app/mastermind/Makefile app/gpsymreg/Makefile) +AC_OUTPUT(src/obsolete/Makefile doc/Makefile src/Makefile src/utils/Makefile src/other/Makefile win/Makefile src/gp/Makefile src/es/Makefile src/ga/Makefile src/do/Makefile test/Makefile contrib/Makefile Makefile app/Makefile app/gprop/Makefile app/mastermind/Makefile app/gpsymreg/Makefile) diff --git a/eo/src/gp/eoParseTree.h b/eo/src/gp/eoParseTree.h index 4a1cd1cc4..5a36a5dcd 100644 --- a/eo/src/gp/eoParseTree.h +++ b/eo/src/gp/eoParseTree.h @@ -27,6 +27,8 @@ #ifndef eoParseTree_h #define eoParseTree_h +#include + #include #include @@ -54,7 +56,7 @@ class eoParseTree : public EO, public parse_tree { public : - typedef parse_tree::subtree Subtree; + typedef typename parse_tree::subtree Subtree; /* For Compatibility with the intel C++ compiler for Linux 5.x */ typedef Node reference; diff --git a/eo/src/gp/eoParseTreeDepthInit.h b/eo/src/gp/eoParseTreeDepthInit.h index f78142910..d77c2d480 100644 --- a/eo/src/gp/eoParseTreeDepthInit.h +++ b/eo/src/gp/eoParseTreeDepthInit.h @@ -121,7 +121,7 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > { if (last_terminal == -1) { // check where the last terminal in the sequence resides - vector::iterator it; + typename vector::iterator it; for (it = initializor.begin(); it != initializor.end(); ++it) { if (it->arity() > 0) @@ -133,12 +133,12 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > if (the_max == 1) { // generate terminals only - vector::iterator it = initializor.begin() + rng.random(last_terminal); + typename vector::iterator it = initializor.begin() + rng.random(last_terminal); sequence.push_front(*it); return; } - vector::iterator what_it; + typename vector::iterator what_it; if (grow) { diff --git a/eo/src/gp/eoParseTreeOp.h b/eo/src/gp/eoParseTreeOp.h index f739d14ef..649b1926d 100644 --- a/eo/src/gp/eoParseTreeOp.h +++ b/eo/src/gp/eoParseTreeOp.h @@ -66,7 +66,7 @@ public: int i = rng.random(_eo1.size()); int j = rng.random(_eo2.size()); - parse_tree::subtree tmp = _eo1[i]; + typename parse_tree::subtree tmp = _eo1[i]; _eo1[i] = _eo2[j]; // insert subtree _eo2[j] = tmp; diff --git a/eo/src/gp/parse_tree.h b/eo/src/gp/parse_tree.h index 90be70bf4..badb062af 100644 --- a/eo/src/gp/parse_tree.h +++ b/eo/src/gp/parse_tree.h @@ -282,7 +282,7 @@ public : } template - void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, subtree::iterator, It)) + void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, typename subtree::iterator, It)) { (content->*f)(v, begin(), misc); } @@ -618,7 +618,7 @@ private : { _root.apply(v, varValues); } template - void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, subtree::iterator, It)) + void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, typename subtree::iterator, It)) { _root.apply_mem_func(v, misc, f); } @@ -689,7 +689,7 @@ private : return *this; } // else - subtree::iterator it; + typename subtree::iterator it; for (it = parent->begin(); it != parent->end(); ++it) { if (node == &(*it)) @@ -779,7 +779,7 @@ private : return *this; } // else - subtree::const_iterator it; + typename subtree::const_iterator it; for (it = parent->begin(); it != parent->end(); ++it) { @@ -888,7 +888,7 @@ private : _root = t; - for (subtree::iterator it = _root.begin(); it != _root.end(); it++) + for (typename subtree::iterator it = _root.begin(); it != _root.end(); it++) { *it = pushed.back(); pushed.pop_back(); @@ -940,25 +940,25 @@ namespace std { // for use with stlport on MSVC template inline -std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::embedded_iterator) +std::forward_iterator_tag iterator_category(typename gp_parse_tree::parse_tree::embedded_iterator) { return std::forward_iterator_tag(); } template inline -ptrdiff_t* distance_type(gp_parse_tree::parse_tree::embedded_iterator) +ptrdiff_t* distance_type(typename gp_parse_tree::parse_tree::embedded_iterator) { return 0; } template inline -std::forward_iterator_tag iterator_category(gp_parse_tree::parse_tree::iterator) +std::forward_iterator_tag iterator_category(typename gp_parse_tree::parse_tree::iterator) { return std::forward_iterator_tag(); } template inline -ptrdiff_t* distance_type(gp_parse_tree::parse_tree::iterator) +ptrdiff_t* distance_type(typename gp_parse_tree::parse_tree::iterator) { return 0; } diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 89c72ad70..c69b2ff44 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -169,7 +169,7 @@ public : is >> repValue; } -private : +//private : ValueType repValue; }; diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index 6a1f748e2..2d5cc48c3 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -197,7 +197,7 @@ void the_main(int argc, char* argv[]) #if !defined(NO_GNUPLOT) eoGnuplot1DSnapshot snapshot("pareto"); - snapshot.pointSize =3; + //snapshot.with(eoGnuplot::Points(3)); cp.add(snapshot); diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index 3fde7f5ca..6e2139b05 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -140,10 +140,10 @@ eoValueParam tournamentSizeParam = parser.createParam(unsigned(2), "to parentsOrg[i].fitness(i); else if (fitnessType == string("exp")) for (unsigned i=0; i