* Possible error in g++ 970907
@ 1997-09-08 17:06 System Source
0 siblings, 0 replies; only message in thread
From: System Source @ 1997-09-08 17:06 UTC (permalink / raw)
To: egcs
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 <class T> struct negate<T>'
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<double> * negate(const class complex<double> *, int)':
/usr/local/pkg/egcs/include/g++/function.h:96: previous non-function declaration `template <class T> struct negate<T>'
mx-inlines.cc:411: conflicts with function declaration `class complex<double> * negate(const class complex<double> *, int)'
-- feature.h --
template <class T>
struct negate : public unary_function<T, T> {
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-09-08 17:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-08 17:06 Possible error in g++ 970907 System Source
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).