From b88cfcaf84b60423443b5d637f623ed5c8e1f72d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Fri, 31 Jul 2015 21:54:35 +0200 Subject: [PATCH] Fixed Trac #11510 ("unique_ptr: -Wshadow warning issued") --- doc/move.qbk | 1 + include/boost/move/unique_ptr.hpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/move.qbk b/doc/move.qbk index b9af501..38370bb 100644 --- a/doc/move.qbk +++ b/doc/move.qbk @@ -768,6 +768,7 @@ Many thanks to all boosters that have tested, reviewed and improved the library. from convertible types returned by value. * Fixed bug: * [@https://svn.boost.org/trac/boost/ticket/11229 Trac #11229: ['"vector incorrectly copies move-only objects using memcpy"]], + * [@https://svn.boost.org/trac/boost/ticket/11510 Trac #11510: ['"unique_ptr: -Wshadow warning issued"]], [endsect] diff --git a/include/boost/move/unique_ptr.hpp b/include/boost/move/unique_ptr.hpp index f005f34..bcf4fae 100644 --- a/include/boost/move/unique_ptr.hpp +++ b/include/boost/move/unique_ptr.hpp @@ -105,8 +105,8 @@ struct unique_ptr_data {} template - unique_ptr_data(P p, BOOST_FWD_REF(U) d) BOOST_NOEXCEPT - : m_p(p), d(::boost::forward(d)) + unique_ptr_data(P p, BOOST_FWD_REF(U) d1) BOOST_NOEXCEPT + : m_p(p), d(::boost::forward(d1)) {} del_ref deleter() { return d; }