【发布时间】:2019-01-17 15:06:49
【问题描述】:
Gcc 编译得很好,但是 Clang (trunk) 拒绝了这个消息:
<source>:7:8: error: class template partial specialization is not more specialized than the primary template [-Winvalid-partial-specialization]
template<class T, T x>
struct S{};
template<int& x>
struct S<int&, x> { };
这段代码是否正确?
【问题讨论】:
标签: c++ gcc clang language-lawyer template-specialization