diff mbox

[v3] libstdc++/49925

Message ID 4E35BD04.6090304@oracle.com
State New
Headers show

Commit Message

Paolo Carlini July 31, 2011, 8:37 p.m. UTC
Hi,

tested x86_64-linux, committed mainline and 4_6-branch.

Paolo.

////////////////////////
2011-07-31  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/49925
	* include/bits/shared_ptr.h (make_shared): Qualify allocate_shared
	with std::.
	* include/bits/shared_ptr_base.h (__make_shared): Likewise.
diff mbox

Patch

Index: include/bits/shared_ptr.h
===================================================================
--- include/bits/shared_ptr.h	(revision 176961)
+++ include/bits/shared_ptr.h	(working copy)
@@ -607,8 +607,8 @@ 
     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.
Index: include/bits/shared_ptr_base.h
===================================================================
--- include/bits/shared_ptr_base.h	(revision 176961)
+++ include/bits/shared_ptr_base.h	(working copy)
@@ -1432,14 +1432,14 @@ 
     __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<typename _Tp, _Lock_policy _Lp>
     struct hash<__shared_ptr<_Tp, _Lp>>
-    : public std::unary_function<__shared_ptr<_Tp, _Lp>, size_t>
+    : public __hash_base<size_t, __shared_ptr<_Tp, _Lp>>
     {
       size_t
       operator()(const __shared_ptr<_Tp, _Lp>& __s) const