From 3096f51bf6988fb20b0d5107322a2aebda25a50c Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sun, 31 Jul 2011 20:28:45 +0000 Subject: [PATCH] re PR libstdc++/49925 ([C++0x] ADL bug mixing boost::shared_ptr and std::make_shared<>) 2011-07-31 Paolo Carlini PR libstdc++/49925 * include/bits/shared_ptr.h (make_shared): Qualify allocate_shared with std::. * include/bits/shared_ptr_base.h (__make_shared): Likewise. From-SVN: r176985 --- libstdc++-v3/ChangeLog | 7 +++++++ libstdc++-v3/include/bits/shared_ptr.h | 4 ++-- libstdc++-v3/include/bits/shared_ptr_base.h | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 42e271f37a2..c8ac5d10ea7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2011-07-31 Paolo Carlini + + PR libstdc++/49925 + * include/bits/shared_ptr.h (make_shared): Qualify allocate_shared + with std::. + * include/bits/shared_ptr_base.h (__make_shared): Likewise. + 2011-07-29 Benjamin Kosnik * doc/xml/manual/build_hacking.xml: Markup imagedata changes. diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h index 2c45f3d7ba3..42acace5b66 100644 --- a/libstdc++-v3/include/bits/shared_ptr.h +++ b/libstdc++-v3/include/bits/shared_ptr.h @@ -607,8 +607,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION make_shared(_Args&&... __args) { typedef typename std::remove_const<_Tp>::type _Tp_nc; - return allocate_shared<_Tp>(std::allocator<_Tp_nc>(), - std::forward<_Args>(__args)...); + return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(), + std::forward<_Args>(__args)...); } /// std::hash specialization for shared_ptr. diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h index 0a84b3c1259..a06f5b99f18 100644 --- a/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/libstdc++-v3/include/bits/shared_ptr_base.h @@ -1432,14 +1432,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __make_shared(_Args&&... __args) { typedef typename std::remove_const<_Tp>::type _Tp_nc; - return __allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(), - std::forward<_Args>(__args)...); + return std::__allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(), + std::forward<_Args>(__args)...); } /// std::hash specialization for __shared_ptr. template struct hash<__shared_ptr<_Tp, _Lp>> - : public std::unary_function<__shared_ptr<_Tp, _Lp>, size_t> + : public __hash_base> { size_t operator()(const __shared_ptr<_Tp, _Lp>& __s) const -- 2.30.2