tmp/tmprdwpig72/{from.md → to.md}
RENAMED
|
@@ -15,68 +15,73 @@ namespace std {
|
|
| 15 |
|
| 16 |
// [util.smartptr.shared.const], constructors
|
| 17 |
constexpr shared_ptr() noexcept;
|
| 18 |
constexpr shared_ptr(nullptr_t) noexcept : shared_ptr() { }
|
| 19 |
template<class Y>
|
| 20 |
-
explicit shared_ptr(Y* p);
|
| 21 |
template<class Y, class D>
|
| 22 |
-
shared_ptr(Y* p, D d);
|
| 23 |
template<class Y, class D, class A>
|
| 24 |
-
shared_ptr(Y* p, D d, A a);
|
| 25 |
template<class D>
|
| 26 |
-
shared_ptr(nullptr_t p, D d);
|
| 27 |
template<class D, class A>
|
| 28 |
-
shared_ptr(nullptr_t p, D d, A a);
|
| 29 |
template<class Y>
|
| 30 |
-
shared_ptr(const shared_ptr<Y>& r, element_type* p) noexcept;
|
| 31 |
template<class Y>
|
| 32 |
-
shared_ptr(shared_ptr<Y>&& r, element_type* p) noexcept;
|
| 33 |
-
shared_ptr(const shared_ptr& r) noexcept;
|
| 34 |
template<class Y>
|
| 35 |
-
shared_ptr(const shared_ptr<Y>& r) noexcept;
|
| 36 |
-
shared_ptr(shared_ptr&& r) noexcept;
|
| 37 |
template<class Y>
|
| 38 |
-
shared_ptr(shared_ptr<Y>&& r) noexcept;
|
| 39 |
template<class Y>
|
| 40 |
-
explicit shared_ptr(const weak_ptr<Y>& r);
|
| 41 |
template<class Y, class D>
|
| 42 |
-
shared_ptr(unique_ptr<Y, D>&& r);
|
| 43 |
|
| 44 |
// [util.smartptr.shared.dest], destructor
|
| 45 |
-
~shared_ptr();
|
| 46 |
|
| 47 |
// [util.smartptr.shared.assign], assignment
|
| 48 |
-
shared_ptr& operator=(const shared_ptr& r) noexcept;
|
| 49 |
template<class Y>
|
| 50 |
-
shared_ptr& operator=(const shared_ptr<Y>& r) noexcept;
|
| 51 |
-
shared_ptr& operator=(shared_ptr&& r) noexcept;
|
| 52 |
template<class Y>
|
| 53 |
-
shared_ptr& operator=(shared_ptr<Y>&& r) noexcept;
|
| 54 |
template<class Y, class D>
|
| 55 |
-
shared_ptr& operator=(unique_ptr<Y, D>&& r);
|
| 56 |
|
| 57 |
// [util.smartptr.shared.mod], modifiers
|
| 58 |
-
void swap(shared_ptr& r) noexcept;
|
| 59 |
-
void reset() noexcept;
|
| 60 |
template<class Y>
|
| 61 |
-
void reset(Y* p);
|
| 62 |
template<class Y, class D>
|
| 63 |
-
void reset(Y* p, D d);
|
| 64 |
template<class Y, class D, class A>
|
| 65 |
-
void reset(Y* p, D d, A a);
|
| 66 |
|
| 67 |
// [util.smartptr.shared.obs], observers
|
| 68 |
-
element_type* get() const noexcept;
|
| 69 |
-
T& operator*() const noexcept;
|
| 70 |
-
T* operator->() const noexcept;
|
| 71 |
-
element_type& operator[](ptrdiff_t i) const;
|
| 72 |
-
long use_count() const noexcept;
|
| 73 |
-
explicit operator bool() const noexcept;
|
| 74 |
template<class U>
|
| 75 |
-
bool owner_before(const shared_ptr<U>& b) const noexcept;
|
| 76 |
template<class U>
|
| 77 |
-
bool owner_before(const weak_ptr<U>& b) const noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
};
|
| 79 |
|
| 80 |
template<class T>
|
| 81 |
shared_ptr(weak_ptr<T>) -> shared_ptr<T>;
|
| 82 |
template<class T, class D>
|
|
@@ -108,9 +113,9 @@ For purposes of determining the presence of a data race, member
|
|
| 108 |
functions shall access and modify only the `shared_ptr` and `weak_ptr`
|
| 109 |
objects themselves and not objects they refer to. Changes in
|
| 110 |
`use_count()` do not reflect modifications that can introduce data
|
| 111 |
races.
|
| 112 |
|
| 113 |
-
For the purposes of
|
| 114 |
-
|
| 115 |
-
|
| 116 |
|
|
|
|
| 15 |
|
| 16 |
// [util.smartptr.shared.const], constructors
|
| 17 |
constexpr shared_ptr() noexcept;
|
| 18 |
constexpr shared_ptr(nullptr_t) noexcept : shared_ptr() { }
|
| 19 |
template<class Y>
|
| 20 |
+
constexpr explicit shared_ptr(Y* p);
|
| 21 |
template<class Y, class D>
|
| 22 |
+
constexpr shared_ptr(Y* p, D d);
|
| 23 |
template<class Y, class D, class A>
|
| 24 |
+
constexpr shared_ptr(Y* p, D d, A a);
|
| 25 |
template<class D>
|
| 26 |
+
constexpr shared_ptr(nullptr_t p, D d);
|
| 27 |
template<class D, class A>
|
| 28 |
+
constexpr shared_ptr(nullptr_t p, D d, A a);
|
| 29 |
template<class Y>
|
| 30 |
+
constexpr shared_ptr(const shared_ptr<Y>& r, element_type* p) noexcept;
|
| 31 |
template<class Y>
|
| 32 |
+
constexpr shared_ptr(shared_ptr<Y>&& r, element_type* p) noexcept;
|
| 33 |
+
constexpr shared_ptr(const shared_ptr& r) noexcept;
|
| 34 |
template<class Y>
|
| 35 |
+
constexpr shared_ptr(const shared_ptr<Y>& r) noexcept;
|
| 36 |
+
constexpr shared_ptr(shared_ptr&& r) noexcept;
|
| 37 |
template<class Y>
|
| 38 |
+
constexpr shared_ptr(shared_ptr<Y>&& r) noexcept;
|
| 39 |
template<class Y>
|
| 40 |
+
constexpr explicit shared_ptr(const weak_ptr<Y>& r);
|
| 41 |
template<class Y, class D>
|
| 42 |
+
constexpr shared_ptr(unique_ptr<Y, D>&& r);
|
| 43 |
|
| 44 |
// [util.smartptr.shared.dest], destructor
|
| 45 |
+
constexpr ~shared_ptr();
|
| 46 |
|
| 47 |
// [util.smartptr.shared.assign], assignment
|
| 48 |
+
constexpr shared_ptr& operator=(const shared_ptr& r) noexcept;
|
| 49 |
template<class Y>
|
| 50 |
+
constexpr shared_ptr& operator=(const shared_ptr<Y>& r) noexcept;
|
| 51 |
+
constexpr shared_ptr& operator=(shared_ptr&& r) noexcept;
|
| 52 |
template<class Y>
|
| 53 |
+
constexpr shared_ptr& operator=(shared_ptr<Y>&& r) noexcept;
|
| 54 |
template<class Y, class D>
|
| 55 |
+
constexpr shared_ptr& operator=(unique_ptr<Y, D>&& r);
|
| 56 |
|
| 57 |
// [util.smartptr.shared.mod], modifiers
|
| 58 |
+
constexpr void swap(shared_ptr& r) noexcept;
|
| 59 |
+
constexpr void reset() noexcept;
|
| 60 |
template<class Y>
|
| 61 |
+
constexpr void reset(Y* p);
|
| 62 |
template<class Y, class D>
|
| 63 |
+
constexpr void reset(Y* p, D d);
|
| 64 |
template<class Y, class D, class A>
|
| 65 |
+
constexpr void reset(Y* p, D d, A a);
|
| 66 |
|
| 67 |
// [util.smartptr.shared.obs], observers
|
| 68 |
+
constexpr element_type* get() const noexcept;
|
| 69 |
+
constexpr T& operator*() const noexcept;
|
| 70 |
+
constexpr T* operator->() const noexcept;
|
| 71 |
+
constexpr element_type& operator[](ptrdiff_t i) const;
|
| 72 |
+
constexpr long use_count() const noexcept;
|
| 73 |
+
constexpr explicit operator bool() const noexcept;
|
| 74 |
template<class U>
|
| 75 |
+
constexpr bool owner_before(const shared_ptr<U>& b) const noexcept;
|
| 76 |
template<class U>
|
| 77 |
+
constexpr bool owner_before(const weak_ptr<U>& b) const noexcept;
|
| 78 |
+
size_t owner_hash() const noexcept;
|
| 79 |
+
template<class U>
|
| 80 |
+
constexpr bool owner_equal(const shared_ptr<U>& b) const noexcept;
|
| 81 |
+
template<class U>
|
| 82 |
+
constexpr bool owner_equal(const weak_ptr<U>& b) const noexcept;
|
| 83 |
};
|
| 84 |
|
| 85 |
template<class T>
|
| 86 |
shared_ptr(weak_ptr<T>) -> shared_ptr<T>;
|
| 87 |
template<class T, class D>
|
|
|
|
| 113 |
functions shall access and modify only the `shared_ptr` and `weak_ptr`
|
| 114 |
objects themselves and not objects they refer to. Changes in
|
| 115 |
`use_count()` do not reflect modifications that can introduce data
|
| 116 |
races.
|
| 117 |
|
| 118 |
+
For the purposes of [[smartptr]], a pointer type `Y*` is said to be
|
| 119 |
+
*compatible with* a pointer type `T*` when either `Y*` is convertible to
|
| 120 |
+
`T*` or `Y` is `U[N]` and `T` is cv `U[]`.
|
| 121 |
|