OSDN Git Service

2013-10-30 Chris Studholme <cvs@cs.utoronto.ca>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / bits / shared_ptr_base.h
index c48c18e..3d4d12b 100644 (file)
@@ -343,6 +343,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a)
       : _M_ptr(__p), _M_del(__d, __a) { }
 
+      ~_Sp_counted_deleter() noexcept { }
+
       virtual void
       _M_dispose() noexcept
       { _M_del._M_del(_M_ptr); }
@@ -392,7 +394,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       template<typename... _Args>
        _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
-       : _M_impl(__a), _M_storage()
+       : _M_impl(__a)
        {
          _M_impl._M_ptr = static_cast<_Tp*>(static_cast<void*>(&_M_storage));
          // _GLIBCXX_RESOLVE_LIB_DEFECTS
@@ -401,6 +403,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
              std::forward<_Args>(__args)...); // might throw
        }
 
+      ~_Sp_counted_ptr_inplace() noexcept { }
+
       virtual void
       _M_dispose() noexcept
       { allocator_traits<_Alloc>::destroy(_M_impl, _M_impl._M_ptr); }
@@ -617,7 +621,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        _S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r,
          typename std::enable_if<!std::is_reference<_Del>::value>::type* = 0)
        {
-         return new _Sp_counted_deleter<_Tp*, _Del, std::allocator<_Tp>,
+         return new _Sp_counted_deleter<_Tp*, _Del, std::allocator<void>,
            _Lp>(__r.get(), __r.get_deleter());
        }
 
@@ -628,7 +632,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        {
          typedef typename std::remove_reference<_Del>::type _Del1;
          typedef std::reference_wrapper<_Del1> _Del2;
-         return new _Sp_counted_deleter<_Tp*, _Del2, std::allocator<_Tp>,
+         return new _Sp_counted_deleter<_Tp*, _Del2, std::allocator<void>,
            _Lp>(__r.get(), std::ref(__r.get_deleter()));
        }