aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/libstdc++-v3/include/bits/shared_ptr.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.6/libstdc++-v3/include/bits/shared_ptr.h')
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/shared_ptr.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc-4.6/libstdc++-v3/include/bits/shared_ptr.h b/gcc-4.6/libstdc++-v3/include/bits/shared_ptr.h
index 97d123f..81ac382 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/shared_ptr.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/shared_ptr.h
@@ -100,6 +100,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr shared_ptr()
: __shared_ptr<_Tp>() { }
+ shared_ptr(const shared_ptr&) = default; // never throws
+
/**
* @brief Construct a %shared_ptr that owns the pointer @a __p.
* @param __p A pointer that is convertible to element_type*.
@@ -264,6 +266,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr shared_ptr(nullptr_t __p)
: __shared_ptr<_Tp>(__p) { }
+ shared_ptr& operator=(const shared_ptr&) = default;
+
template<typename _Tp1>
shared_ptr&
operator=(const shared_ptr<_Tp1>& __r) // never throws
@@ -543,8 +547,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.
@@ -553,7 +557,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public std::unary_function<shared_ptr<_Tp>, size_t>
{
size_t
- operator()(const shared_ptr<_Tp>& __s) const
+ operator()(const shared_ptr<_Tp>& __s) const noexcept
{ return std::hash<_Tp*>()(__s.get()); }
};