mirror of git://gcc.gnu.org/git/gcc.git
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
|
|
@ -15,6 +15,11 @@
|
||||||
* include/bits/atomic_base.h (__atomic_base<_PTp*>::_M_type_size): Add
|
* include/bits/atomic_base.h (__atomic_base<_PTp*>::_M_type_size): Add
|
||||||
const to constexpr member functions.
|
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>
|
2014-04-14 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
* include/bits/stl_vector.h (_Vector_base::_Vector_impl,
|
* include/bits/stl_vector.h (_Vector_base::_Vector_impl,
|
||||||
|
|
|
||||||
|
|
@ -262,8 +262,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
* @param __p A null pointer constant.
|
* @param __p A null pointer constant.
|
||||||
* @post use_count() == 0 && get() == nullptr
|
* @post use_count() == 0 && get() == nullptr
|
||||||
*/
|
*/
|
||||||
constexpr shared_ptr(nullptr_t __p) noexcept
|
constexpr shared_ptr(nullptr_t __p) noexcept : shared_ptr() { }
|
||||||
: __shared_ptr<_Tp>(__p) { }
|
|
||||||
|
|
||||||
shared_ptr& operator=(const shared_ptr&) noexcept = default;
|
shared_ptr& operator=(const shared_ptr&) noexcept = default;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -963,10 +963,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
__shared_ptr(std::auto_ptr<_Tp1>&& __r);
|
__shared_ptr(std::auto_ptr<_Tp1>&& __r);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* TODO: use delegating constructor */
|
constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { }
|
||||||
constexpr __shared_ptr(nullptr_t) noexcept
|
|
||||||
: _M_ptr(0), _M_refcount()
|
|
||||||
{ }
|
|
||||||
|
|
||||||
template<typename _Tp1>
|
template<typename _Tp1>
|
||||||
__shared_ptr&
|
__shared_ptr&
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue