Compiler Error C2272
'function' : modifiers not allowed on static member functions
A static
member function is declared with a memory-model specifier, such as const or volatile, and such modifiers are not allowed on static
member functions.
The following sample generates C2272:
// C2272.cpp
// compile with: /c
class CMyClass {
public:
static void func1() const volatile; // C2272 func1 is static
void func2() const volatile; // OK
};
Pripomienky
https://aka.ms/ContentUserFeedback.
Pripravujeme: V priebehu roka 2024 postupne zrušíme službu Problémy v službe GitHub ako mechanizmus pripomienok týkajúcich sa obsahu a nahradíme ju novým systémom pripomienok. Ďalšie informácie nájdete na stránke:Odoslať a zobraziť pripomienky pre