aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2011-07-31 20:28:45 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2011-07-31 20:28:45 +0000
commit3096f51bf6988fb20b0d5107322a2aebda25a50c (patch)
treeec7fd4b4935900f24578ca8ed433ba4d676ce2e4
parenta30596354de502932d005f38551425a86e231f89 (diff)
downloadgcc-3096f51bf6988fb20b0d5107322a2aebda25a50c.zip
gcc-3096f51bf6988fb20b0d5107322a2aebda25a50c.tar.gz
gcc-3096f51bf6988fb20b0d5107322a2aebda25a50c.tar.bz2
re PR libstdc++/49925 ([C++0x] ADL bug mixing boost::shared_ptr and std::make_shared<>)
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. From-SVN: r176985
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/bits/shared_ptr.h4
-rw-r--r--libstdc++-v3/include/bits/shared_ptr_base.h6
3 files changed, 12 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 42e271f..c8ac5d1 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2011-07-29 Benjamin Kosnik <bkoz@redhat.com>
* 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 2c45f3d..42acace 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 0a84b3c..a06f5b9 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<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