
Hello,
In the interprocess library, move semantics are provided for all the container
types using boost::interprocess::move().
The code for move semantics is (mostly) present in the shared object types and
shared_region, but something is missing for it to actually work for these classes:
the necessary specialization of the 'is_movable' trait, and the correct signature on the
copy constructor and assignment operators.
For example, this does not compile:
//----------------
file_mapping m_file;
{
file_mapping f("file.bin", ipc::read_write);
m_file = move(f);
}
//----------------
But this workaround compiles and works as expected:
//----------------
file_mapping m_file;
{
file_mapping f("file.bin", ipc::read_write);
detail::moved_object