forked from boostorg/smart_ptr
Asciidoctor 2 fixes
This commit is contained in:
@ -174,7 +174,8 @@ template<class Y> intrusive_ptr(intrusive_ptr<Y> && 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<class T> void swap(intrusive_ptr<T> & a, intrusive_ptr<T> & b) noexcept
|
||||
[none]
|
||||
* {blank}
|
||||
+
|
||||
Effects:: Equivalent to `a.swap(b)`.
|
||||
Effects::
|
||||
Equivalent to `a.swap(b)`.
|
||||
|
||||
### get_pointer
|
||||
|
||||
@ -437,7 +443,8 @@ template<class T, class U>
|
||||
[none]
|
||||
* {blank}
|
||||
+
|
||||
Returns:: `intrusive_ptr<T>(static_cast<T*>(r.get()))`.
|
||||
Returns::
|
||||
`intrusive_ptr<T>(static_cast<T*>(r.get()))`.
|
||||
|
||||
### const_pointer_cast
|
||||
|
||||
@ -449,7 +456,8 @@ template<class T, class U>
|
||||
[none]
|
||||
* {blank}
|
||||
+
|
||||
Returns:: `intrusive_ptr<T>(const_cast<T*>(r.get()))`.
|
||||
Returns::
|
||||
`intrusive_ptr<T>(const_cast<T*>(r.get()))`.
|
||||
|
||||
### dynamic_pointer_cast
|
||||
|
||||
@ -461,7 +469,8 @@ template<class T, class U>
|
||||
[none]
|
||||
* {blank}
|
||||
+
|
||||
Returns:: `intrusive_ptr<T>(dynamic_cast<T*>(r.get()))`.
|
||||
Returns::
|
||||
`intrusive_ptr<T>(dynamic_cast<T*>(r.get()))`.
|
||||
|
||||
### operator<<
|
||||
|
||||
|
@ -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<class Derived, class CounterPolicy>
|
||||
[none]
|
||||
* {blank}
|
||||
+
|
||||
Effects:: Increments the reference counter.
|
||||
Effects::
|
||||
Increments the reference counter.
|
||||
|
||||
### intrusive_ptr_release
|
||||
|
||||
|
@ -459,7 +459,8 @@ template<class Y> void reset(local_shared_ptr<Y> && 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<class Y> bool owner_before(local_shared_ptr<Y> 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<class T> void swap(local_shared_ptr<T> & a, local_shared_ptr<T> & b) no
|
||||
[none]
|
||||
* {blank}
|
||||
+
|
||||
Effects:: Equivalent to `a.swap(b)`.
|
||||
Effects::
|
||||
Equivalent to `a.swap(b)`.
|
||||
|
||||
### get_pointer
|
||||
```
|
||||
|
@ -563,7 +563,8 @@ template<class Y> void reset(shared_ptr<Y> && 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<class Y> bool owner_before(weak_ptr<Y> 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<class Y> bool owner_equals(weak_ptr<Y> 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<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b) noexcept;
|
||||
[none]
|
||||
* {blank}
|
||||
+
|
||||
Effects:: Equivalent to `a.swap(b)`.
|
||||
Effects::
|
||||
Equivalent to `a.swap(b)`.
|
||||
|
||||
### get_pointer
|
||||
```
|
||||
@ -820,7 +828,8 @@ template<class D, class T>
|
||||
[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
|
||||
|
||||
|
@ -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<T> lock() const noexcept;
|
||||
[none]
|
||||
* {blank}
|
||||
+
|
||||
Returns:: `expired()? shared_ptr<T>(): shared_ptr<T>(*this)`.
|
||||
Returns::
|
||||
`expired()? shared_ptr<T>(): shared_ptr<T>(*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<class Y> bool owner_before( shared_ptr<Y> 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<class Y> bool owner_equals( shared_ptr<Y> 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<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b) noexcept;
|
||||
[none]
|
||||
* {blank}
|
||||
+
|
||||
Effects:: Equivalent to `a.swap(b)`.
|
||||
Effects::
|
||||
Equivalent to `a.swap(b)`.
|
||||
|
||||
## Frequently Asked Questions
|
||||
|
||||
|
Reference in New Issue
Block a user