This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Probably a bug


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]