“identifier”:“nothrow”只能应用于函数声明或定义
注解
nothrow 扩展属性只能应用于函数声明或定义。
Example
以下示例生成 C2495:
// C2495.cpp
// compile with: /c
__declspec(nothrow) class X { // C2495
int m_data;
} x;
__declspec(nothrow) void test(); // OK
“identifier”:“nothrow”只能应用于函数声明或定义
nothrow 扩展属性只能应用于函数声明或定义。
以下示例生成 C2495:
// C2495.cpp
// compile with: /c
__declspec(nothrow) class X { // C2495
int m_data;
} x;
__declspec(nothrow) void test(); // OK