From Jason Turner

[type.index.overview]

Diff to HTML by rtfpessoa

tmp/tmp5ah073ra/{from.md → to.md} RENAMED
@@ -4,25 +4,26 @@
4
  namespace std {
5
  class type_index {
6
  public:
7
  type_index(const type_info& rhs) noexcept;
8
  bool operator==(const type_index& rhs) const noexcept;
9
- bool operator!=(const type_index& rhs) const noexcept;
10
  bool operator< (const type_index& rhs) const noexcept;
11
- bool operator<= (const type_index& rhs) const noexcept;
12
  bool operator> (const type_index& rhs) const noexcept;
 
13
  bool operator>=(const type_index& rhs) const noexcept;
 
14
  size_t hash_code() const noexcept;
15
  const char* name() const noexcept;
 
16
  private:
17
  const type_info* target; // exposition only
18
  // Note that the use of a pointer here, rather than a reference,
19
  // means that the default copy/move constructor and assignment
20
  // operators will be provided and work as expected.
21
  };
22
  }
23
  ```
24
 
25
  The class `type_index` provides a simple wrapper for `type_info` which
26
- can be used as an index type in associative containers (
27
- [[associative]]) and in unordered associative containers ([[unord]]).
28
 
 
4
  namespace std {
5
  class type_index {
6
  public:
7
  type_index(const type_info& rhs) noexcept;
8
  bool operator==(const type_index& rhs) const noexcept;
 
9
  bool operator< (const type_index& rhs) const noexcept;
 
10
  bool operator> (const type_index& rhs) const noexcept;
11
+ bool operator<=(const type_index& rhs) const noexcept;
12
  bool operator>=(const type_index& rhs) const noexcept;
13
+ strong_ordering operator<=>(const type_index& rhs) const noexcept;
14
  size_t hash_code() const noexcept;
15
  const char* name() const noexcept;
16
+
17
  private:
18
  const type_info* target; // exposition only
19
  // Note that the use of a pointer here, rather than a reference,
20
  // means that the default copy/move constructor and assignment
21
  // operators will be provided and work as expected.
22
  };
23
  }
24
  ```
25
 
26
  The class `type_index` provides a simple wrapper for `type_info` which
27
+ can be used as an index type in associative containers [[associative]]
28
+ and in unordered associative containers [[unord]].
29