From mboxrd@z Thu Jan 1 00:00:00 1970 From: System Source To: egcs@cygnus.com Subject: Possible error in g++ 970907 Date: Mon, 08 Sep 1997 17:06:00 -0000 Message-id: <199709090004.MAA06723@stat1.stat.auckland.ac.nz> X-SW-Source: 1997-09/msg00318.html While compiling octave 2.0.9 I have hit the following problem. This compiles fine with gcc-2.7.2.3.f.2. /usr/local/pkg/egcs/include/g++/function.h: In function `double * negate(const double *, int)': /usr/local/pkg/egcs/include/g++/function.h:96: previous non-function declaration `template struct negate' In file included from CColVector.cc:37: mx-inlines.cc:188: conflicts with function declaration `double * negate(const double *, int)' /usr/local/pkg/egcs/include/g++/function.h: In function `class complex * negate(const class complex *, int)': /usr/local/pkg/egcs/include/g++/function.h:96: previous non-function declaration `template struct negate' mx-inlines.cc:411: conflicts with function declaration `class complex * negate(const class complex *, int)' -- feature.h -- template struct negate : public unary_function { T operator()(const T& x) const { return -x; } }; -- mx-inlines.cc -- static inline double * negate (const double *d, int len) { double *result = 0; if (len > 0) { result = new double [len]; for (int i = 0; i < len; i++) result[i] = -d[i]; } return result; }