Gcc编译好了,但是Clang(trunk)拒绝了这个消息:
<source>:7:8: error: class template partial specialization is not more specialized than the primary template [-Winvalid-partial-specialization]
Run Code Online (Sandbox Code Playgroud)
template<class T, T x>
struct S{};
template<int& x>
struct S<int&, x> { };
Run Code Online (Sandbox Code Playgroud)
这段代码是否正确?