https://bugs.llvm.org/show_bug.cgi?id=38127
Bug ID: 38127
Summary: explicit specialization in non-namespace scope
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: zhong...@pku.org.cn
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
The code is as follows:
struct Type {
template <int i>
static void Foo() {}
template <>
void Foo<0>() {}
};
void call() { Type::Foo<0>(); }
clang++ accepts the code, but g++ rejects it:
code0.cpp:4:12: error: explicit specialization in non-namespace scope 'struct
Type'
template <>
^
code0.cpp:5:14: error: template-id 'Foo<0>' in declaration of primary template
void Foo<0>() {}
^
The diagnose of g++ looks reasonable, right?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs