Код: Выделить всё
int main() {
struct Local {
virtual void foo() = 0;
};
void (Local::*ptr)() = &A::foo;
}
Код: Выделить всё
H:\a.cpp(3,18): error C3640: 'main::Local::[thunk]: __cdecl `int __cdecl main(void)'::`2'::Local::`vcall'{0,{flat}}' }'': a referenced or virtual member function of a local class must be defined [H:\build\a.vcxproj]
Пример в Compiler Explorer
Подробнее здесь: https://stackoverflow.com/questions/798 ... es-allowed
Мобильная версия