mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-08-01 05:34:36 +02:00
Document owner_equals
This commit is contained in:
@@ -178,8 +178,11 @@ namespace boost {
|
|||||||
|
|
||||||
void swap(shared_ptr & b) noexcept;
|
void swap(shared_ptr & b) noexcept;
|
||||||
|
|
||||||
template<class Y> bool owner_before(shared_ptr<Y> const & rhs) const noexcept;
|
template<class Y> bool owner_before(shared_ptr<Y> const & r) const noexcept;
|
||||||
template<class Y> bool owner_before(weak_ptr<Y> const & rhs) const noexcept;
|
template<class Y> bool owner_before(weak_ptr<Y> const & r) const noexcept;
|
||||||
|
|
||||||
|
template<class Y> bool owner_equals(shared_ptr<Y> const & r) const noexcept;
|
||||||
|
template<class Y> bool owner_equals(weak_ptr<Y> const & r) const noexcept;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T, class U>
|
template<class T, class U>
|
||||||
@@ -645,15 +648,27 @@ Effects:: Exchanges the contents of the two smart pointers.
|
|||||||
|
|
||||||
### owner_before
|
### owner_before
|
||||||
```
|
```
|
||||||
template<class Y> bool owner_before(shared_ptr<Y> const & rhs) const noexcept;
|
template<class Y> bool owner_before(shared_ptr<Y> const & r) const noexcept;
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
template<class Y> bool owner_before(weak_ptr<Y> const & rhs) const noexcept;
|
template<class Y> bool owner_before(weak_ptr<Y> const & r) const noexcept;
|
||||||
```
|
```
|
||||||
[none]
|
[none]
|
||||||
* {blank}
|
* {blank}
|
||||||
+
|
+
|
||||||
Effects:: See the description of `operator<`.
|
Returns:: See the description of `operator<`.
|
||||||
|
|
||||||
|
### owner_equals
|
||||||
|
```
|
||||||
|
template<class Y> bool owner_equals(shared_ptr<Y> const & r) const noexcept;
|
||||||
|
```
|
||||||
|
```
|
||||||
|
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.
|
||||||
|
|
||||||
## Free Functions
|
## Free Functions
|
||||||
|
|
||||||
|
@@ -112,6 +112,9 @@ namespace boost {
|
|||||||
|
|
||||||
template<class Y> bool owner_before( weak_ptr<Y> const & r ) const noexcept;
|
template<class Y> bool owner_before( weak_ptr<Y> const & r ) const noexcept;
|
||||||
template<class Y> bool owner_before( shared_ptr<Y> const & r ) const noexcept;
|
template<class Y> bool owner_before( shared_ptr<Y> const & r ) const noexcept;
|
||||||
|
|
||||||
|
template<class Y> bool owner_equals( weak_ptr<Y> const & r ) const noexcept;
|
||||||
|
template<class Y> bool owner_equals( shared_ptr<Y> const & r ) const noexcept;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T, class U>
|
template<class T, class U>
|
||||||
@@ -263,6 +266,7 @@ void swap(weak_ptr & b) noexcept;
|
|||||||
+
|
+
|
||||||
Effects:: Exchanges the contents of the two smart pointers.
|
Effects:: Exchanges the contents of the two smart pointers.
|
||||||
|
|
||||||
|
### owner_before
|
||||||
```
|
```
|
||||||
template<class Y> bool owner_before( weak_ptr<Y> const & r ) const noexcept;
|
template<class Y> bool owner_before( weak_ptr<Y> const & r ) const noexcept;
|
||||||
```
|
```
|
||||||
@@ -274,6 +278,18 @@ template<class Y> bool owner_before( shared_ptr<Y> const & r ) const noexcept;
|
|||||||
+
|
+
|
||||||
Returns:: See the description of `operator<`.
|
Returns:: See the description of `operator<`.
|
||||||
|
|
||||||
|
### owner_equals
|
||||||
|
```
|
||||||
|
template<class Y> bool owner_equals( weak_ptr<Y> const & r ) const noexcept;
|
||||||
|
```
|
||||||
|
```
|
||||||
|
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.
|
||||||
|
|
||||||
## Free Functions
|
## Free Functions
|
||||||
|
|
||||||
### comparison
|
### comparison
|
||||||
|
Reference in New Issue
Block a user