summaryrefslogtreecommitdiff
path: root/libs/move/doc/move.qbk
diff options
context:
space:
mode:
Diffstat (limited to 'libs/move/doc/move.qbk')
-rw-r--r--libs/move/doc/move.qbk33
1 files changed, 25 insertions, 8 deletions
diff --git a/libs/move/doc/move.qbk b/libs/move/doc/move.qbk
index dbd7d11a8..729e92a43 100644
--- a/libs/move/doc/move.qbk
+++ b/libs/move/doc/move.qbk
@@ -532,19 +532,26 @@ care to achieve portable and efficient code when using the library with C++03 co
[section:emulation_limitations_base Initializing base classes]
When initializing base classes in move constructors, users must
-cast the reference to a base class reference before moving it. Example:
+cast the reference to a base class reference before moving it or just
+use `BOOST_MOVE_BASE`. Example:
[c++]
- //Portable and efficient
Derived(BOOST_RV_REF(Derived) x) // Move ctor
- : Base(boost::move(static_cast<Base&>(x))),
- mem_(boost::move(x.mem_)) { }
+ : Base(boost::move(static_cast<Base&>(x)))
+ //...
+or
+
+[c++]
+
+ Derived(BOOST_RV_REF(Derived) x) // Move ctor
+ : Base(BOOST_MOVE_BASE(Base, x))
+ //...
If casting is not performed the emulation will not move construct
-the base class, because no conversion is available from `BOOST_RV_REF(Derived)`
-to `BOOST_RV_REF(Base)`. Without the cast we might obtain a compilation
+the base class, because no conversion is available from `BOOST_RV_REF(Derived)` to
+`BOOST_RV_REF(Base)`. Without the cast or `BOOST_MOVE_BASE` we might obtain a compilation
error (for non-copyable types) or a less-efficient move constructor (for copyable types):
[c++]
@@ -552,8 +559,8 @@ error (for non-copyable types) or a less-efficient move constructor (for copyabl
//If Derived is copyable, then Base is copy-constructed.
//If not, a compilation error is issued
Derived(BOOST_RV_REF(Derived) x) // Move ctor
- : Base(boost::move(x)),
- mem_(boost::move(x.mem_)) { }
+ : Base(boost::move(x))
+ //...
[endsect]
@@ -755,6 +762,16 @@ Many thanks to all boosters that have tested, reviewed and improved the library.
[section:release_notes Release Notes]
+[section:release_notes_boost_1_58_00 Boost 1.58 Release]
+
+* Added [macroref BOOST_MOVE_BASE BOOST_MOVE_BASE] utility.
+* Added [funcref boost::adl_move_swap adl_move_swap] utility.
+* Reduced dependencies on other Boost libraries to make the library a bit more lightweight.
+* Fixed bugs:
+ * [@https://svn.boost.org/trac/boost/ticket/11044 Trac #11044: ['"boost::rv inherits off union, when such passed as template argument"]].
+
+[endsect]
+
[section:release_notes_boost_1_57_00 Boost 1.57 Release]
* Added `unique_ptr` smart pointer. Thanks to Howard Hinnant for his excellent unique_ptr emulation code and testsuite.