Boost logo

Boost :

From: Niels Dekker - mail address until 2008-12-31 (nd_mail_address_valid_until_2008-12-31_at_[hidden])
Date: 2008-03-25 18:57:24


>> Wouldn't it be preferable to explicitly disallow the assignment of
>> any::holder?

Alexander Nasonov replied:
> This makes sense. Can you please attach a patch on the bug page as
> I don't MSVC at the moment to make the patch myself.

Done! (And added a short note to the ticket as well.)

> PS: I don't know if this patch can be approved for 1.35.

But I guess it can still be patched onto the trunk...

>> Just by adding a private and unimplemented copy assignment
>> operator? [...]

Martin Bonner wrote:
> MJB>> But that's not the way to explicitly disallow assignment.

Surely it is a proper way to do so! Albeit the "traditional way" :-)
http://www.boost.org/libs/utility/utility.htm#Class_noncopyable

> MJB>> Instead you derive from boost::non_copyable (sp?).

It appears that for MSVC 2008 and MSVC 2005, the issue could indeed be
solved by deriving boost::any::placeholder from boost::noncopyable.
Unfortunately this wouldn't stop MSVC 2003 from complaining, "assignment
operator could not be generated". (And yes, I still use MSVC 2003!)

Kind regards,

  Niels


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk