From Jason Turner

[util.smartptr.shared.cmp]

Diff to HTML by rtfpessoa

tmp/tmp7snvs_h5/{from.md → to.md} RENAMED
@@ -1,6 +1,6 @@
1
- #### Comparison <a id="util.smartptr.shared.cmp">[[util.smartptr.shared.cmp]]</a>
2
 
3
  ``` cpp
4
  template<class T, class U>
5
  bool operator==(const shared_ptr<T>& a, const shared_ptr<U>& b) noexcept;
6
  ```
@@ -19,15 +19,19 @@ template<class T, class U>
19
  strong_ordering operator<=>(const shared_ptr<T>& a, const shared_ptr<U>& b) noexcept;
20
  ```
21
 
22
  *Returns:* `compare_three_way()(a.get(), b.get())`.
23
 
24
- [*Note 1*: Defining a comparison function allows `shared_ptr` objects
25
- to be used as keys in associative containers. — *end note*]
26
 
27
  ``` cpp
28
  template<class T>
29
  strong_ordering operator<=>(const shared_ptr<T>& a, nullptr_t) noexcept;
30
  ```
31
 
32
- *Returns:* `compare_three_way()(a.get(), nullptr)`.
 
 
 
 
33
 
 
1
+ ##### Comparison <a id="util.smartptr.shared.cmp">[[util.smartptr.shared.cmp]]</a>
2
 
3
  ``` cpp
4
  template<class T, class U>
5
  bool operator==(const shared_ptr<T>& a, const shared_ptr<U>& b) noexcept;
6
  ```
 
19
  strong_ordering operator<=>(const shared_ptr<T>& a, const shared_ptr<U>& b) noexcept;
20
  ```
21
 
22
  *Returns:* `compare_three_way()(a.get(), b.get())`.
23
 
24
+ [*Note 8*: Defining a comparison operator function allows `shared_ptr`
25
+ objects to be used as keys in associative containers. — *end note*]
26
 
27
  ``` cpp
28
  template<class T>
29
  strong_ordering operator<=>(const shared_ptr<T>& a, nullptr_t) noexcept;
30
  ```
31
 
32
+ *Returns:*
33
+
34
+ ``` cpp
35
+ compare_three_way()(a.get(), static_cast<typename shared_ptr<T>::element_type*>(nullptr).
36
+ ```
37