On Dec 20, 2007 1:33 PM, Gustav Broberg <broberg@...370...> wrote:
On Thu, 20 Dec 2007 12:42:26 -0800 "John Faith" <jfaith7@...400...> wrote:
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:
[...]
template <typename OutputIterator> class SVGPathGenerator /*: public SVGPathSink*/ { public: void lineTo(Point p) { _path.appendNew<LineSegment>(p); //<---error: parse error before `;' token }
Could you try and see if adding the "template" keyword before the method name makes any difference to the poor compiler? That is,
... void lineTo(Point p) { _path.template appendNew<LineSegment>(p); } ...
Hi Gustav, That worked. I thank you, and my poor compiler thanks you!
Do you know if there an official term for this type of usage of "template?"
, John