Boost logo

Boost :

Subject: Re: [boost] [any] last commit breaks program_options
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2013-04-15 13:45:50


On Mon, Apr 15, 2013 at 8:58 AM, Steven Watanabe <watanabesj_at_[hidden]>wrote:

> AMDG
>
> On 04/15/2013 02:19 AM, Antony Polukhin wrote:
> >
> > This looks like Boost.Move known limitation:
> >
> http://www.boost.org/doc/libs/1_53_0/doc/html/move/emulation_limitations.html#move.emulation_limitations.assignment_operator
> >
> > I'm afraid that this will confuse a lot of people who use Boost.Any...
> > May be it would be better to disable ravlue emulation and use rvalues
> > only in C++11?
> >
>
> Yeah. Adding Boost.Move emulation in existing
> libraries is probably a bad idea.
>

Should be almost as good to change Boost.Any's copy assignment operator to
accept by value on C++03 and implement as swap, no? And keep the move
constructor and move assignment for both C++03 and C++11. C++11 copy
assignment would continue to accept by reference-to-const.

- Jeff


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