Boost C++ Libraries: Ticket #12351: boost::make_shared doesn't use constructor forwarding through move emulation https://svn.boost.org/trac10/ticket/12351 <p> 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. </p> <p> The Boost.Move documentation describes <a href="http://www.boost.org/doc/libs/1_59_0/doc/html/move/construct_forwarding.html">how to perform (limited) constructor forwarding</a>. It's example is perfectly applicable to boost::make_shared. </p> <p> The change in <a class="ext-link" href="https://github.com/boostorg/smart_ptr/pull/24"><span class="icon">​</span>boostorg/smart_ptr#24</a> implements constructor forwarding for make_shared as documented in Boost.Move's documentation. </p> <p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12351 Trac 1.4.3 me@… Tue, 26 Jul 2016 09:06:01 GMT attachment set https://svn.boost.org/trac10/ticket/12351 https://svn.boost.org/trac10/ticket/12351 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">0001-boost-make_shared-use-Constructor-Forwarding-on-C-03.patch</span> </li> </ul> <p> patch boostorg/smart_ptr<a class="closed ticket" href="https://svn.boost.org/trac10/ticket/24" title="#24: Bugs: smart_ptr.hpp warnings on vacpp (closed: Wont Fix)">#24</a> adding (partial) constructor forwarding on C++03 </p> Ticket