shared_ptr.h (shared_ptr::shared_ptr(nullptr_t)): Use delegating constructor.
* include/bits/shared_ptr.h (shared_ptr::shared_ptr(nullptr_t)): Use delegating constructor. * include/bits/shared_ptr_base.h (__shared_ptr::__shared_ptr(nullptr_t)): Likewise From-SVN: r209428
This commit is contained in:
parent
260d16c8ca
commit
ed39835fdc
3 changed files with 7 additions and 6 deletions
|
@ -15,6 +15,11 @@
|
|||
* include/bits/atomic_base.h (__atomic_base<_PTp*>::_M_type_size): Add
|
||||
const to constexpr member functions.
|
||||
|
||||
* include/bits/shared_ptr.h (shared_ptr::shared_ptr(nullptr_t)): Use
|
||||
delegating constructor.
|
||||
* include/bits/shared_ptr_base.h
|
||||
(__shared_ptr::__shared_ptr(nullptr_t)): Likewise
|
||||
|
||||
2014-04-14 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* include/bits/stl_vector.h (_Vector_base::_Vector_impl,
|
||||
|
|
|
@ -262,8 +262,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
* @param __p A null pointer constant.
|
||||
* @post use_count() == 0 && get() == nullptr
|
||||
*/
|
||||
constexpr shared_ptr(nullptr_t __p) noexcept
|
||||
: __shared_ptr<_Tp>(__p) { }
|
||||
constexpr shared_ptr(nullptr_t __p) noexcept : shared_ptr() { }
|
||||
|
||||
shared_ptr& operator=(const shared_ptr&) noexcept = default;
|
||||
|
||||
|
|
|
@ -963,10 +963,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
__shared_ptr(std::auto_ptr<_Tp1>&& __r);
|
||||
#endif
|
||||
|
||||
/* TODO: use delegating constructor */
|
||||
constexpr __shared_ptr(nullptr_t) noexcept
|
||||
: _M_ptr(0), _M_refcount()
|
||||
{ }
|
||||
constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { }
|
||||
|
||||
template<typename _Tp1>
|
||||
__shared_ptr&
|
||||
|
|
Loading…
Add table
Reference in a new issue