共用方式為


編譯器錯誤 C2495

'identifier' :'nothrow' 只能套用至函式宣告或定義

nothrow 擴充屬性只能套用至函式宣告或定義。

下列範例會產生 C2495:

// C2495.cpp
// compile with: /c
__declspec(nothrow) class X {   // C2495
   int m_data;
} x;

__declspec(nothrow) void test();   // OK