共用方式為


編譯器錯誤 C2583

'identifier': 'const/volatile' 的 'this' 指針在建構函式/解構函式中是不合法的

備註

建構子解構子不能被宣告constvolatile

範例

下列範例會產生 C2583:

// C2583.cpp
// compile with: /c
struct S
{
    S() const {}   // C2583

    // Try the following line instead:
    // S() {}
};