Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Chapter 16. Boost.Move

Ion Gaztanaga

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Table of Contents

What is Boost.Move?
Introduction
Implementing copyable and movable classes
Copyable and movable classes in C++0x
Copyable and movable classes in portable syntax for both C++03 and C++0x compilers
Composition or inheritance
Movable but Non-Copyable Types
Containers and move semantics
Constructor Forwarding
Move iterators
Move inserters
Move algorithms
Emulation limitations
Initializing base classes
Template parameters for perfect forwarding
Binding of rvalue references to lvalues
Assignment operator in classes derived from or holding copyable and movable types
How the library works
Thanks and credits
Release Notes
Boost 1.49 Release
Reference
Header <boost/move/move.hpp>
[Important] Important

To be able to use containers of movable-only values you will need to use containers supporting move semantics, like Boost.Container containers

[Note] Note

Tested compilers: MSVC-7.1, 8.0, 9.0, GCC 4.3-MinGW in C++03 and C++0x modes, Intel 10.1

Rvalue references are a major C++0x feature, enabling move semantics for C++ values. However, we don't need C++0x compilers to take advantage of move semanatics. Boost.Move emulates C++0x move semantics in C++03 compilers and allows writing portable code that works optimally in C++03 and C++0x compilers.

Last revised: June 23, 2012 at 08:49:46 GMT


PrevUpHomeNext