This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Probably a bug
- To: Maksim Likharev <maxl at uts dot com>
- Subject: Re: Probably a bug
- From: Martin Sebor <sebor at roguewave dot com>
- Date: Tue, 29 Aug 2000 21:03:44 -0600
- CC: gcc-bugs at gcc dot gnu dot org
- Organization: Rogue Wave Software, Inc.
- References: <39AC32F5.8CE8EF90@uts.com>
Maksim Likharev wrote:
>
> template<class _T> class Template {
> public:
> virtual void foo();
> };
>
> template<class _T> void Template<_T>::foo() {
> }
>
> template<> class Template<const char*> {
> public:
> virtual void foo();
> };
>
> template<> void Template<const char*>::foo() { }
^^^^^^^^^^
14.7.3, p5 forbids the explicit specialization syntax with definitions
of members of explicitly specialized class templates:
-5- ... Definitions of members of an explicitly specialized class are
defined in the same manner as members of normal classes, and not using
the explicit specialization syntax.
Regards
Martin