“attribute”:特性不支持未命名参数
源 annotation 特性与 CLR 自定义特性或编译器特性不同,仅支持命名参数。
示例
以下示例生成 C3457。
#include "SourceAnnotations.h"
[vc_attributes::Post( 1 )] int f(); // C3457
[vc_attributes::Post( Valid=vc_attributes::Yes )] int f2(); // OK
“attribute”:特性不支持未命名参数
源 annotation 特性与 CLR 自定义特性或编译器特性不同,仅支持命名参数。
以下示例生成 C3457。
#include "SourceAnnotations.h"
[vc_attributes::Post( 1 )] int f(); // C3457
[vc_attributes::Post( Valid=vc_attributes::Yes )] int f2(); // OK