Boost logo

Boost :

Subject: Re: [boost] [any] last commit breaks program_options
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2013-04-15 17:26:21

Antony Polukhin wrote:
> 2013/4/15 Jeffrey Lee Hellrung, Jr. <jeffrey.hellrung_at_[hidden]>:
>> On Mon, Apr 15, 2013 at 8:58 AM, Steven Watanabe <watanabesj_at_[hidden]>wrote:
>>> 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.
> Just removed rvalues emulation via Boost.Move from Boost.Any.
> Now rvalues of Boost.Any work only on C++11 compilers (r83917, #6999).

If the problem is that the compiler can't generate implicit copy
assignment when your class with move emulation is wrapped in some other
one, you might leave move emulation and just add an explicitly defined
copy assignment if there is no rvalue references support.

It won't generate rvalue reference when the object is returned from a
function but it will be possible to move objects. And it will be
backward compatible.

Adam Wulkiewicz

Boost list run by bdawes at, gregod at, cpdaniel at, john at