编译器错误 C2756
“模板类型”: 部分专用化中不允许有默认模板自变量
部分专用化的模板不能包含默认自变量。
下面的示例生成 C2756,并演示如何修复此错误:
// C2756.cpp
template <class T>
struct S {};
template <class T=int>
// try the following line instead
// template <class T>
struct S<T*> {}; // C2756
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈