1 2 3 4 5 6 7 8 9 10 11 12 13
#include <iostream> using namespace std; class I { virtual void method(){}; protected: ~I() {} }; int main(){ I base; return 0; }
1 2 3
In function 'int main()': Line 7: error: 'I::~I()' is protected compilation terminated due to -Wfatal-errors.