Teilen über


Compilerfehler C2583

'identifier': 'const/volatile' 'this'-Zeiger ist illegal für Konstruktoren/Destruktoren

Bemerkungen

Ein Konstruktor oder Destruktor kann weder const noch volatile deklariert werden.

Beispiel

Im folgenden Beispiel wird C2583 generiert:

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

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