Hello, There seems to be a template problem in 2geom which is preventing OS X 10.3 (gcc 3.3) from compiling. This is an example of code which fails, simplified from 2geom/path.h and 2geom/svg-path.h:
//-------------------------------------- // build with: g++ -c -o test.o test.cpp class LineSegment; class Point;
class Path { public: template <typename CurveType, typename A> void appendNew(A a) { do_append(new CurveType((*final_)[0], a)); } };
template <typename OutputIterator> class SVGPathGenerator /*: public SVGPathSink*/ { public: void lineTo(Point p) { _path.appendNew<LineSegment>(p); //<---error: parse error before `;' token } protected: Path _path; }; //--------------------------------------
I can get this example to compile by making the whole Path class the template versus just the appendNew method, but it's not clear that making this change would be the right way to go in src/2geom/path.h.
Does anyone with template experience or 2geom knowledge have any ideas on how this might be simplified to make older compilers happy?
Thanks! , John