Delen via


Compilerfout C2272

'functie' : modifiers die niet zijn toegestaan voor statische lidfuncties

Opmerkingen

Een static lidfunctie wordt gedeclareerd met een geheugenmodelaanduiding, zoals const of vluchtig, en dergelijke wijzigingsfuncties zijn niet toegestaan voor static lidfuncties.

Example

In het volgende voorbeeld wordt C2272 gegenereerd:

// C2272.cpp
// compile with: /c
class CMyClass {
public:
   static void func1() const volatile;   // C2272  func1 is static
   void func2() const volatile;   // OK
};