此代码曾用于Visual Studio 2015,但它不再适用于Visual Studio 2015更新1.
class Foo { protected: virtual ~Foo() {}; friend class Foo__init; }; class Foo__init { public: Foo _init; }; static Foo__init _Foo_init;
它失败并出现以下错误:
Error C2248 'Foo::~Foo': cannot access protected member declared in class 'Foo'
这是编译器错误还是代码生成错误?