Member templates

Klaus-Georg Adams Klaus-Georg.Adams@chemie.uni-karlsruhe.de
Thu Nov 26 01:54:00 GMT 1998


Hi Bruce,
after fixing two typos in your code it compiles cleanly with egcs-1.1
and egcs-2.92.21 19981119. The diff is attached.

-- kga
-------------------------------------------------------------------------
Klaus-Georg Adams        Email: Klaus-Georg.Adams@chemie.uni-karlsruhe.de
Institut f. Anorg. Chemie, Lehrstuhl II            Tel: 49(0)721 608 3485
Universität Karlsruhe, D-76128 Karlsruhe
-------------------------------------------------------------------------
--- memtemp82.orig.C    Thu Nov 26 10:41:02 1998
+++ memtemp82.C Thu Nov 26 10:40:01 1998
@@ -20,7 +20,7 @@
 
 template<class X, class Y> class Composition {
 public:
-  template<class F, class G> composition(F, G);
+  template<class F, class G> Composition(F, G);
   Composition(const Composition&);
   Composition& operator=(const Composition&);
   ~Composition();
@@ -41,7 +41,7 @@
   : p(c.p->clone()) {}
 
 template<class X, class Y>
-Composition& Composition<X, Y>::operator=(const Composition& c) {
+Composition<X,Y>& Composition<X, Y>::operator=(const Composition& c) {
   if(this != &c) {
     delete p;
     p = p.clone();



More information about the Gcc-bugs mailing list