This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/85282] New: CWG 727 (full specialization in non-namespace scope)
- From: "songyuanyao at qq dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 08 Apr 2018 01:01:22 +0000
- Subject: [Bug c++/85282] New: CWG 727 (full specialization in non-namespace scope)
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282
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 gnu.org
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],
[temp.mem]).