C++ 为什么不是';这类专业化使用的概念是否被接受?

C++ 为什么不是';这类专业化使用的概念是否被接受?,c++,templates,template-meta-programming,c++20,c++-concepts,C++,Templates,Template Meta Programming,C++20,C++ Concepts,下面的代码试图使用一个概念部分地专门化一个类,并向专门化中添加一个方法,但被clang 11.0.0拒绝: #包括 模板//注意:前面的模板声明在这里 结构S{}; 模板 结构 { 无效f(); }; 模板//错误:模板重新声明中的类型约束不同 void S::f() { } clang给出了错误消息: <source>:14:16: error: type constraint differs in template redeclaration template <std:

下面的代码试图使用一个概念部分地专门化一个类,并向专门化中添加一个方法,但被clang 11.0.0拒绝:

#包括
模板//注意:前面的模板声明在这里
结构S{};
模板
结构
{
无效f();
};
模板//错误:模板重新声明中的类型约束不同
void S::f()
{
}
clang给出了错误消息:

<source>:14:16: error: type constraint differs in template redeclaration
template <std::integral T>
               ^
<source>:3:11: note: previous template declaration is here
template <typename T>
:14:16:错误:模板重新声明中的类型约束不同
模板
^
:3:11:注意:前面的模板声明在此
模板

(见附件)。为什么这个代码是错误的?或者这是一只叮当作响的虫子?(FWIW,gcc trunk和MSVC 19.28都接受此代码,尽管这不能保证正确性。)

这绝对是一个叮当作响的错误。它已经存档了-