编译器错误 C3237
“generic_class”: 泛型类不能是自定义特性
泛型类不能是用户定义的特性。
示例
以下示例生成 C3237。
// C3237.cpp
// compile with: /clr /c
// C3237 expected
using namespace System;
generic <class T>
// Delete the following line to resolve.
[attribute(AttributeTargets::All, AllowMultiple=true)]
public ref class GR {};
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈