|
Boost : |
From: Costin Calisov (costin_at_[hidden])
Date: 2007-05-30 02:59:59
----- Original Message -----
From: "Christopher Woods" <cwoods_eol_at_[hidden]>
To: <boost_at_[hidden]>
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk