[Boost-bugs] [Boost C++ Libraries] #12351: boost::make_shared doesn't use constructor forwarding through move emulation

Subject: [Boost-bugs] [Boost C++ Libraries] #12351: boost::make_shared doesn't use constructor forwarding through move emulation
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-07-26 09:03:12


#12351: boost::make_shared doesn't use constructor forwarding through move
emulation
------------------------------+-----------------------
 Reporter: me@… | Owner: pdimov
     Type: Patches | Status: new
Milestone: To Be Determined | Component: smart_ptr
  Version: Boost 1.59.0 | Severity: Problem
 Keywords: |
------------------------------+-----------------------
 Currently, boost::make_shared doesn't perform constructor forwarding
 unless C++11 r-value references are supported. This prevents using of
 MOVABLE_BUT_NOT_COPYABLE types as arguments to constructors.

 The Boost.Move documentation describes
 [http://www.boost.org/doc/libs/1_59_0/doc/html/move/construct_forwarding.html
 how to perform (limited) constructor forwarding]. It's example is
 perfectly applicable to boost::make_shared.

 The change in [https://github.com/boostorg/smart_ptr/pull/24
 boostorg/smart_ptr#24] implements constructor forwarding for make_shared
 as documented in Boost.Move's documentation.

 With this change the difference between the code supporting r-value
 references but not supporting variadic templates became the type signature
 and the call to boost::detail::sp_forward and boost::forward. The first
 difference was eliminated by using the macro BOOST_FWD_REF, the second by
 using boost::forward in both places, making the two pieces of code
 textually equal and thus I also removed the duplicate.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12351>
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:20 UTC