egsc error
Patrick L. Nolan
pln@egret1.Stanford.EDU
Wed Mar 17 12:16:00 GMT 1999
razzle[pln](26): g++ Dimensioned.cxx
Dimensioned.cxx:15: Internal compiler error.
Dimensioned.cxx:15: Please submit a full bug report to `egcs-bugs@cygnus.com'.
razzle[pln](27): g++ -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
Dimensioned.cxx
#ifndef DIMENSIONED_H
#define DIMENSIONED_H
template <class T>
class Dimensioned {
private:
double m_data;
Dimensioned(double t);
public:
friend class T;
// Dimensioned(); // Default constructor
// Operator overloads: add and subtract Dimensioneds
T & operator += (const T & t);
T & operator -= (const T & t);
// Operator overloads: scalar multiplication and division
T & operator *= (const double x);
T & operator /= (const double x);
// Unary -
T operator - () const;
// Comparisons
bool operator > (const T & t) const;
bool operator < (const T & t) const;
bool operator >= (const T & t) const;
bool operator <= (const T & t) const;
bool operator == (const T & t) const;
bool operator != (const T & t) const;
// Dimensioneds can be added and subtracted
T operator + (const T & t) const;
T operator - (const T & t) const;
// Scalar multiplication on the right
const T operator * (const double & x) const;
// Scalar division
const T operator / (const double & x) const;
// Ratio of two Dimensioneds is dimensionless
const double operator / (const T & t) const;
};
// -------------------------------------------------------------------
// Outside the class
// Scalar multiplication on the left
template <class T>
const T operator * (const double & x, const T & t);
#endif DIMENSIONED_H
More information about the Gcc-bugs
mailing list