[Boost-bugs] [Boost C++ Libraries] #7620: Basic rvalue and C++11 support

Subject: [Boost-bugs] [Boost C++ Libraries] #7620: Basic rvalue and C++11 support
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-11-01 17:49:14


#7620: Basic rvalue and C++11 support
------------------------------+---------------------------------------------
 Reporter: apolukhin | Owner: ebf
     Type: Patches | Status: new
Milestone: To Be Determined | Component: variant
  Version: Boost 1.52.0 | Severity: Optimization
 Keywords: |
------------------------------+---------------------------------------------
 This patch adds `variant(variant&&)`, `variant& operator=(variant&&)` and
 `template <class T> variant& operator=(T&&)` functions to Boost.Variant
 for compilers with rvalue references support (rvalue emulation via
 Boost.Move is not used for compatability reasons).

 `template <class T> variant& operator=(T&&)` function is enabled only if
 T&& is a rvalue reference.

 Patch is constructded via copying original assign functions and adding
 move semantics to them. Example:
 Visitor `copy_into` was copied as `move_into`. Copy constructors in
 `internal_visit` functions were replaced by move constructors.

 If compiler supports rvalue references, std::move is imported to namespace
 ::boost::detail::variant (this also worked around bug with unqualified
 call to `move()` in MSVC2010)

 `BOOST_NOEXCEPT` modifiers added to some methods.

 This patch improves performance up to 6 times for some operations.
 Was tested on GCC-4.6 (with and without c++11 mode) and MSVC2012.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7620>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC