Bug ID: 85282
           Summary: CWG 727 (full specialization in non-namespace scope)
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot
          Reporter: songyuanyao at qq dot com
  Target Milestone: ---

According to CWG 727, the following code should be accepted; i.e. full
specialization may be declared inside class definition.

struct A {
  template<class T> struct B;
  template <> struct B<int*> { };

And per [temp.expl.spec] paragraph 2,

An explicit specialization may be declared in any scope in which the
corresponding primary template may be defined ([namespace.memdef], [class.mem],

Reply via email to