[Bug c++/86310] New: Clang rejects partial specialization with non-type template argument of different type
zhonghao at pku dot org.cn
gcc-bugzilla@gcc.gnu.org
Mon Jun 25 08:51:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86310
Bug ID: 86310
Summary: Clang rejects partial specialization with non-type
template argument of different type
Product: gcc
Version: 8.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
template<char C1, char C2>
struct X;
template<int C1>
struct X<C1, C1>;
clang++ accepts the code, but g++ rejects it:
code0.c.cpp:5:8: error: template argument '(char)C1' involves template
parameter(s)
struct X<C1, C1>;
^~~~~~~~~
code0.c.cpp:5:8: error: template argument '(char)C1' involves template
parameter(s)
The code comes from a clang report: https://bugs.llvm.org/show_bug.cgi?id=8905
It fixed a similar problem.
More information about the Gcc-bugs
mailing list