From Jason Turner

[cmp.weakord]

Diff to HTML by rtfpessoa

tmp/tmp5l_kjjcx/{from.md → to.md} RENAMED
@@ -1,19 +1,18 @@
1
  #### Class `weak_ordering` <a id="cmp.weakord">[[cmp.weakord]]</a>
2
 
3
  The `weak_ordering` type is typically used as the result type of a
4
- three-way comparison operator [[expr.spaceship]] that (a) admits all of
5
- the six two-way comparison operators ([[expr.rel]], [[expr.eq]]), and
6
- (b) does not imply substitutability.
7
 
8
  ``` cpp
9
  namespace std {
10
  class weak_ordering {
11
  int value; // exposition only
12
 
13
  // exposition-only constructors
14
- constexpr explicit weak_ordering(eq v) noexcept : value(int(v)) {} // exposition only
15
  constexpr explicit weak_ordering(ord v) noexcept : value(int(v)) {} // exposition only
16
 
17
  public:
18
  // valid values
19
  static const weak_ordering less;
@@ -38,11 +37,11 @@ namespace std {
38
  friend constexpr weak_ordering operator<=>(unspecified, weak_ordering v) noexcept;
39
  };
40
 
41
  // valid values' definitions
42
  inline constexpr weak_ordering weak_ordering::less(ord::less);
43
- inline constexpr weak_ordering weak_ordering::equivalent(eq::equivalent);
44
  inline constexpr weak_ordering weak_ordering::greater(ord::greater);
45
  }
46
  ```
47
 
48
  ``` cpp
 
1
  #### Class `weak_ordering` <a id="cmp.weakord">[[cmp.weakord]]</a>
2
 
3
  The `weak_ordering` type is typically used as the result type of a
4
+ three-way comparison operator [[expr.spaceship]] for a type that admits
5
+ all of the six two-way comparison operators [[expr.rel]], [[expr.eq]]
6
+ and for which equality need not imply substitutability.
7
 
8
  ``` cpp
9
  namespace std {
10
  class weak_ordering {
11
  int value; // exposition only
12
 
13
  // exposition-only constructors
 
14
  constexpr explicit weak_ordering(ord v) noexcept : value(int(v)) {} // exposition only
15
 
16
  public:
17
  // valid values
18
  static const weak_ordering less;
 
37
  friend constexpr weak_ordering operator<=>(unspecified, weak_ordering v) noexcept;
38
  };
39
 
40
  // valid values' definitions
41
  inline constexpr weak_ordering weak_ordering::less(ord::less);
42
+ inline constexpr weak_ordering weak_ordering::equivalent(ord::equivalent);
43
  inline constexpr weak_ordering weak_ordering::greater(ord::greater);
44
  }
45
  ```
46
 
47
  ``` cpp