No Subject
ÃÂàÿõøø (õÿ÷ÃÂÃÂÃÂýÃÂ)
hym@moldesign.ajou.ac.kr
Mon Mar 9 05:02:00 GMT 1998
I could not compile my C++ source code with g++ compiler(egcs-1.01 release).
the source code is below.
// tcategory.c
template<class V,class S>
class AdditiveCategory{
public:
friend V operator + (const V& lhs,const V& rhs){
V temp(lhs);
return temp+=rhs;
}
};
template<class T,int i>
class AClass: public AdditiveCategory<AClass<T,i>,T>
{
public:
AClass(const T& t):val(t){}
AClass(const AClass& a):val(a.val){}
AClass& operator+=(const AClass& a){val+=a.val;return *this;}
private:
T val;
};
void main()
{
AClass<double,1> a(3);
}
The compile time error is below.
tcategory.c:5: Internal compiler error.
tcategory.c:5: Please submit a full bug report to `egcs-bugs@cygnus.com'.
How can I fix the error? I would greatly appreciate your advice.
More information about the Gcc-bugs
mailing list