From Jason Turner

[util.smartptr.shared.cmp]

Diff to HTML by rtfpessoa

tmp/tmpjdergtz3/{from.md → to.md} RENAMED
@@ -1,37 +1,37 @@
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
  ```
7
 
8
  *Returns:* `a.get() == b.get()`.
9
 
10
  ``` cpp
11
  template<class T>
12
- bool operator==(const shared_ptr<T>& a, nullptr_t) noexcept;
13
  ```
14
 
15
  *Returns:* `!a`.
16
 
17
  ``` cpp
18
  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 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
 
 
1
  ##### Comparison <a id="util.smartptr.shared.cmp">[[util.smartptr.shared.cmp]]</a>
2
 
3
  ``` cpp
4
  template<class T, class U>
5
+ constexpr bool operator==(const shared_ptr<T>& a, const shared_ptr<U>& b) noexcept;
6
  ```
7
 
8
  *Returns:* `a.get() == b.get()`.
9
 
10
  ``` cpp
11
  template<class T>
12
+ constexpr bool operator==(const shared_ptr<T>& a, nullptr_t) noexcept;
13
  ```
14
 
15
  *Returns:* `!a`.
16
 
17
  ``` cpp
18
  template<class T, class U>
19
+ constexpr 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
+ constexpr 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