I observe various bugs when deriving from a dllexport'ed class with copying disabled.Let's continue straight to a sample:------------------------------------------------------------------------class __declspec(dllexport) A{protected: A() {}private: // Deny copying A(const A&); const A& operator = (const A&);};#define TESTCASE 0#if (TESTCASE == 0) // Success ?! class __declspec(dllexport) B : public A { }; class C : public B { };#elif (TESTCASE == 1) // error LNK2019: unresolved external symbol "public: class C & __thiscall C::operator=(class C const &)" (??4C@@QAEAAV0@ABV0@@Z) referenced in function "void __cdecl Foo(void)" (?Foo@@YAXXZ) class __declspec(dllexport) C : public A { };#elif (TESTCASE == 2) // error C2248: 'A::operator =' : cannot access private member declared in class 'A' class C : public A { };#endifvoid Foo(){ C object1; C object2; object2 = object1;}------------------------------------------------------------------------In testcase 2, things go as expected.In testcase 0, the code is compiled without any errors or warnings, while it clearly should not.In test case 1, the code is compiled, but not linked due to missing C::operator=(), which is not defined nor declared, and should not be used due to the base class restriction.
Visual Studio/Silverlight/Tooling version
What category (if any) best represents this feedback?
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results