Udostępnij za pomocą


Błąd kompilatora C2583

"identyfikator": wskaźnik "const/volatile" "this" jest niedozwolony dla konstruktorów/destruktorów

Uwagi

Nie można zadeklarować konstruktora ani destruktora jako const lub volatile.

Przykład

Poniższy przykład generuje kod C2583:

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

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