
----- Original Message ----- From: "Christopher Woods" <cwoods_eol@yahoo.com> To: <boost@lists.boost.org> Sent: Tuesday, May 29, 2007 7:49 PM Subject: Re: [boost] boost::final similar to boost::noncopyable
The latter gets around's MSVC error re: no copy constructor or explicit copy constructor. It seems that MSVC compiler is implicitly defining an explicit copy constructor so you have to declare one to get around it.
Hi Chris, I was hopping also, but I must do something wrong, I copy paste your code in VC71, and VC8 and get the same error with no copy constructor ...following is the full code I used: class final_base { protected: final_base(); }; class final : public virtual final_base { protected: final(); private: final(const final&); }; class B : final { public: B() {} }; /*class C : B { public: C() {} // Error - no derive from the B but msg is not obvious IMHO };*/ int main() { B t1; B t2(t1); // Okay - because of private copy constructor in final } Best Regards, Costin Calisov