This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs-g++-971215: template specialization problem
- To: egcs-bugs at cygnus dot com
- Subject: egcs-g++-971215: template specialization problem
- From: Mark Mitchell <mmitchell at usa dot net>
- Date: Thu, 18 Dec 1997 12:16:21 GMT
- References: <Pine.SUN.3.96.971218100427.23578N-100000@platon>
- Reply-To: mmitchell at usa dot net
Dirk --
>>>>> "Dirk" == Dirk Herrmann <dirk@ida.ing.tu-bs.de> writes:
Dirk> The following code does not compile:
>> cat test.cc
Dirk> template <class T> struct X { virtual void f(int) const; };
Dirk> template <class T> struct Y: public X<T> { virtual void
Dirk> f(int) const; };
Dirk> template <class T> void Y<T>::f(int) const { }
Dirk> template <> void Y<bool>::f(int) const;
>> g++ test.cc
Dirk> test.cc:19: prototype for `void Y<bool>::f(int) const' does
Dirk> not match any in class `X<bool>' test.cc:4: candidate is:
Dirk> void X<bool>::f(int) const
This works fine for me, so I think that this patch:
http://www.cygnus.com/ml/egcs/1997-Dec/0967.html
fixed the problem. Please give that a try and see if it helps.
--
Mark Mitchell mmitchell@usa.net
Stanford University http://www.stanford.edu