From efceb04665f58f6b4fb7563d6de230a81d0ea6ef Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 1 Jun 2020 01:02:09 +0300 Subject: [PATCH] Asciidoctor 2 fixes --- doc/smart_ptr/intrusive_ptr.adoc | 27 ++++++++++++++++-------- doc/smart_ptr/intrusive_ref_counter.adoc | 6 ++++-- doc/smart_ptr/local_shared_ptr.adoc | 18 ++++++++++------ doc/smart_ptr/shared_ptr.adoc | 27 ++++++++++++++++-------- doc/smart_ptr/weak_ptr.adoc | 27 ++++++++++++++++-------- 5 files changed, 70 insertions(+), 35 deletions(-) diff --git a/doc/smart_ptr/intrusive_ptr.adoc b/doc/smart_ptr/intrusive_ptr.adoc index 544fcc3..7ce574f 100644 --- a/doc/smart_ptr/intrusive_ptr.adoc +++ b/doc/smart_ptr/intrusive_ptr.adoc @@ -174,7 +174,8 @@ template intrusive_ptr(intrusive_ptr && r); [none] * {blank} + -Postconditions:: `get()` equals the old value of `r.get()`. `r.get() == 0`. +Postconditions:: + `get()` equals the old value of `r.get()`. `r.get() == 0`. ### destructor @@ -185,7 +186,8 @@ Postconditions:: `get()` equals the old value of `r.get()`. `r.get() == 0`. [none] * {blank} + -Effects:: `if(get() != 0) intrusive_ptr_release(get());`. +Effects:: + `if(get() != 0) intrusive_ptr_release(get());`. ### assignment @@ -245,7 +247,8 @@ void reset(T * r, bool add_ref); [none] * {blank} + -Effects:: Equivalent to `intrusive_ptr(r, add_ref).swap(*this)`. +Effects:: + Equivalent to `intrusive_ptr(r, add_ref).swap(*this)`. ### indirection @@ -278,7 +281,8 @@ T * get() const noexcept; [none] * {blank} + -Returns:: the stored pointer. +Returns:: + the stored pointer. ### detach @@ -325,7 +329,8 @@ void swap(intrusive_ptr & b) noexcept; [none] * {blank} + -Effects:: Exchanges the contents of the two smart pointers. +Effects:: + Exchanges the contents of the two smart pointers. ## Free Functions @@ -412,7 +417,8 @@ template void swap(intrusive_ptr & a, intrusive_ptr & b) noexcept [none] * {blank} + -Effects:: Equivalent to `a.swap(b)`. +Effects:: + Equivalent to `a.swap(b)`. ### get_pointer @@ -437,7 +443,8 @@ template [none] * {blank} + -Returns:: `intrusive_ptr(static_cast(r.get()))`. +Returns:: + `intrusive_ptr(static_cast(r.get()))`. ### const_pointer_cast @@ -449,7 +456,8 @@ template [none] * {blank} + -Returns:: `intrusive_ptr(const_cast(r.get()))`. +Returns:: + `intrusive_ptr(const_cast(r.get()))`. ### dynamic_pointer_cast @@ -461,7 +469,8 @@ template [none] * {blank} + -Returns:: `intrusive_ptr(dynamic_cast(r.get()))`. +Returns:: + `intrusive_ptr(dynamic_cast(r.get()))`. ### operator<< diff --git a/doc/smart_ptr/intrusive_ref_counter.adoc b/doc/smart_ptr/intrusive_ref_counter.adoc index ef65902..0ef54fa 100644 --- a/doc/smart_ptr/intrusive_ref_counter.adoc +++ b/doc/smart_ptr/intrusive_ref_counter.adoc @@ -111,7 +111,8 @@ intrusive_ref_counter& operator=(const intrusive_ref_counter& v) noexcept; [none] * {blank} + -Effects:: Does nothing, reference counter is not modified. +Effects:: + Does nothing, reference counter is not modified. ### use_count @@ -137,7 +138,8 @@ template [none] * {blank} + -Effects:: Increments the reference counter. +Effects:: + Increments the reference counter. ### intrusive_ptr_release diff --git a/doc/smart_ptr/local_shared_ptr.adoc b/doc/smart_ptr/local_shared_ptr.adoc index 158179b..7406ca9 100644 --- a/doc/smart_ptr/local_shared_ptr.adoc +++ b/doc/smart_ptr/local_shared_ptr.adoc @@ -459,7 +459,8 @@ template void reset(local_shared_ptr && r, element_type * p) noexcep [none] * {blank} + -Effects:: Equivalent to `local_shared_ptr(std::move(r), p).swap(*this)`. +Effects:: + Equivalent to `local_shared_ptr(std::move(r), p).swap(*this)`. ### indirection ``` @@ -497,7 +498,8 @@ element_type * get() const noexcept; [none] * {blank} + -Returns:: The stored pointer. +Returns:: + The stored pointer. ### local_use_count ``` @@ -506,7 +508,8 @@ long local_use_count() const noexcept; [none] * {blank} + -Returns:: The number of `local_shared_ptr` objects, `*this` included, that share ownership with `*this`, or 0 when `*this` is empty. +Returns:: + The number of `local_shared_ptr` objects, `*this` included, that share ownership with `*this`, or 0 when `*this` is empty. ### conversions ``` @@ -538,7 +541,8 @@ void swap(local_shared_ptr & b) noexcept; [none] * {blank} + -Effects:: Exchanges the contents of the two smart pointers. +Effects:: + Exchanges the contents of the two smart pointers. ### owner_before ``` @@ -547,7 +551,8 @@ template bool owner_before(local_shared_ptr const & rhs) const noexc [none] * {blank} + -Effects:: See the description of `operator<`. +Effects:: + See the description of `operator<`. ## Free Functions @@ -631,7 +636,8 @@ template void swap(local_shared_ptr & a, local_shared_ptr & b) no [none] * {blank} + -Effects:: Equivalent to `a.swap(b)`. +Effects:: + Equivalent to `a.swap(b)`. ### get_pointer ``` diff --git a/doc/smart_ptr/shared_ptr.adoc b/doc/smart_ptr/shared_ptr.adoc index ea8091a..5d5303e 100644 --- a/doc/smart_ptr/shared_ptr.adoc +++ b/doc/smart_ptr/shared_ptr.adoc @@ -563,7 +563,8 @@ template void reset(shared_ptr && r, element_type * p) noexcept; [none] * {blank} + -Effects:: Equivalent to `shared_ptr(std::move(r), p).swap(*this)`. +Effects:: + Equivalent to `shared_ptr(std::move(r), p).swap(*this)`. ### indirection ``` @@ -601,7 +602,8 @@ element_type * get() const noexcept; [none] * {blank} + -Returns:: The stored pointer. +Returns:: + The stored pointer. ### unique ``` @@ -610,7 +612,8 @@ bool unique() const noexcept; [none] * {blank} + -Returns:: `use_count() == 1`. +Returns:: + `use_count() == 1`. ### use_count ``` @@ -619,7 +622,8 @@ long use_count() const noexcept; [none] * {blank} + -Returns:: The number of `shared_ptr` objects, `*this` included, that share ownership with `*this`, or 0 when `*this` is empty. +Returns:: + The number of `shared_ptr` objects, `*this` included, that share ownership with `*this`, or 0 when `*this` is empty. ### conversions ``` @@ -644,7 +648,8 @@ void swap(shared_ptr & b) noexcept; [none] * {blank} + -Effects:: Exchanges the contents of the two smart pointers. +Effects:: + Exchanges the contents of the two smart pointers. ### owner_before ``` @@ -656,7 +661,8 @@ template bool owner_before(weak_ptr const & r) const noexcept; [none] * {blank} + -Returns:: See the description of `operator<`. +Returns:: + See the description of `operator<`. ### owner_equals ``` @@ -668,7 +674,8 @@ template bool owner_equals(weak_ptr const & r) const noexcept; [none] * {blank} + -Returns:: `true` if and only if `*this` and `r` share ownership or are both empty. +Returns:: + `true` if and only if `*this` and `r` share ownership or are both empty. ## Free Functions @@ -736,7 +743,8 @@ template void swap(shared_ptr & a, shared_ptr & b) noexcept; [none] * {blank} + -Effects:: Equivalent to `a.swap(b)`. +Effects:: + Equivalent to `a.swap(b)`. ### get_pointer ``` @@ -820,7 +828,8 @@ template [none] * {blank} + -Returns:: If `*this` owns a deleter `d` of type (cv-unqualified) `D`, returns `&d`; otherwise returns 0. +Returns:: + If `*this` owns a deleter `d` of type (cv-unqualified) `D`, returns `&d`; otherwise returns 0. ### Atomic Access diff --git a/doc/smart_ptr/weak_ptr.adoc b/doc/smart_ptr/weak_ptr.adoc index d70da9d..33455eb 100644 --- a/doc/smart_ptr/weak_ptr.adoc +++ b/doc/smart_ptr/weak_ptr.adoc @@ -188,7 +188,8 @@ NOTE: These constructors are an extension, not present in `std::weak_ptr`. [none] * {blank} + -Effects:: Destroys this `weak_ptr` but has no effect on the object its stored pointer points to. +Effects:: + Destroys this `weak_ptr` but has no effect on the object its stored pointer points to. ### assignment ``` @@ -217,7 +218,8 @@ long use_count() const noexcept; [none] * {blank} + -Returns:: 0 if `*this` is empty; otherwise, the number of `shared_ptr` objects that share ownership with `*this`. +Returns:: + 0 if `*this` is empty; otherwise, the number of `shared_ptr` objects that share ownership with `*this`. ### expired ``` @@ -226,7 +228,8 @@ bool expired() const noexcept; [none] * {blank} + -Returns:: `use_count() == 0`. +Returns:: + `use_count() == 0`. ### empty ``` @@ -246,7 +249,8 @@ shared_ptr lock() const noexcept; [none] * {blank} + -Returns:: `expired()? shared_ptr(): shared_ptr(*this)`. +Returns:: + `expired()? shared_ptr(): shared_ptr(*this)`. ### reset ``` @@ -255,7 +259,8 @@ void reset() noexcept; [none] * {blank} + -Effects:: Equivalent to `weak_ptr().swap(*this)`. +Effects:: + Equivalent to `weak_ptr().swap(*this)`. ### swap ``` @@ -264,7 +269,8 @@ void swap(weak_ptr & b) noexcept; [none] * {blank} + -Effects:: Exchanges the contents of the two smart pointers. +Effects:: + Exchanges the contents of the two smart pointers. ### owner_before ``` @@ -276,7 +282,8 @@ template bool owner_before( shared_ptr const & r ) const noexcept; [none] * {blank} + -Returns:: See the description of `operator<`. +Returns:: + See the description of `operator<`. ### owner_equals ``` @@ -288,7 +295,8 @@ template bool owner_equals( shared_ptr const & r ) const noexcept; [none] * {blank} + -Returns:: `true` if and only if `*this` and `r` share ownership or are both empty. +Returns:: + `true` if and only if `*this` and `r` share ownership or are both empty. ## Free Functions @@ -314,7 +322,8 @@ template void swap(weak_ptr & a, weak_ptr & b) noexcept; [none] * {blank} + -Effects:: Equivalent to `a.swap(b)`. +Effects:: + Equivalent to `a.swap(b)`. ## Frequently Asked Questions