Boost logo

Boost :

Subject: Re: [boost] [variant] Why no move emulation with Boost.Move for C++03?
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2014-04-14 04:34:05

2014-04-14 10:16 GMT+04:00 Adam Romanek <romanek.adam_at_[hidden]>:

> On 04/13/2014 02:59 PM, Steven Watanabe wrote:
>> Boost.Move is not completely backwards
>> compatible. i.e. adding it to an existing
>> class can break user code.
> Steven, could you please elaborate on this? I mean how can it break
> existing code? And what about backward compatibility? I haven't found
> anything on it in the documentation. Thanks in advance.

Main restriction that affect portability is described here:"Assignment
operator in classes derived from or holding copyable and
movable types")

It is a big problem. For example this limitation broke compilation of
Boost.ProgramOptions after move emulation was added to Boost.Any:

Because of that restriction Boost.Variant, Boost.Any and
Boost.CircularBuffer do not use Boost.Move emulation everywhere. For those
libraries some of the move functions are available only in C++11 mode.

Best regards,
Antony Polukhin

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