From c85abde6b04d6226e720c7c8c90cc3432a69be4a Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 21 Jun 2017 02:06:16 +0300 Subject: [PATCH] Update shared_ptr.adoc --- doc/smart_ptr/shared_ptr.adoc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/smart_ptr/shared_ptr.adoc b/doc/smart_ptr/shared_ptr.adoc index 0e0ef82..64761dd 100644 --- a/doc/smart_ptr/shared_ptr.adoc +++ b/doc/smart_ptr/shared_ptr.adoc @@ -114,8 +114,8 @@ namespace boost { typedef /*see below*/ element_type; - shared_ptr() noexcept; - shared_ptr(std::nullptr_t) noexcept; + constexpr shared_ptr() noexcept; + constexpr shared_ptr(std::nullptr_t) noexcept; template explicit shared_ptr(Y * p); template shared_ptr(Y * p, D d); @@ -162,6 +162,7 @@ namespace boost { template void reset(Y * p, D d, A a); template void reset(shared_ptr const & r, element_type * p) noexcept; + template void reset(shared_ptr && r, element_type * p) noexcept; T & operator*() const noexcept; // only valid when T is not an array type T * operator->() const noexcept; // only valid when T is not an array type @@ -257,10 +258,10 @@ typedef ... element_type; ### default constructor ``` -shared_ptr() noexcept; +constexpr shared_ptr() noexcept; ``` ``` -shared_ptr(std::nullptr_t) noexcept; +constexpr shared_ptr(std::nullptr_t) noexcept; ``` [none] * {blank} @@ -372,7 +373,7 @@ template shared_ptr(shared_ptr const & r, element_type * p) noexcept [none] * {blank} + -Effects:: constructs a shared_ptr that shares ownership with r and stores p. +Effects:: constructs a `shared_ptr` that shares ownership with `r` and stores `p`. Postconditions:: `get() == p && use_count() == r.use_count()`.