From Jason Turner

[syserr.errcondition]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpl8av18rj/{from.md → to.md} +19 -24
tmp/tmpl8av18rj/{from.md → to.md} RENAMED
@@ -1,44 +1,43 @@
1
  ### Class `error_condition` <a id="syserr.errcondition">[[syserr.errcondition]]</a>
2
 
3
  #### Class `error_condition` overview <a id="syserr.errcondition.overview">[[syserr.errcondition.overview]]</a>
4
 
5
  The class `error_condition` describes an object used to hold values
6
- identifying error conditions. `error_condition` values are portable
7
- abstractions, while `error_code` values ([[syserr.errcode]]) are
8
- implementation specific.
 
 
9
 
10
  ``` cpp
11
  namespace std {
12
  class error_condition {
13
  public:
14
- // [syserr.errcondition.constructors] constructors:
15
  error_condition() noexcept;
16
  error_condition(int val, const error_category& cat) noexcept;
17
  template <class ErrorConditionEnum>
18
  error_condition(ErrorConditionEnum e) noexcept;
19
 
20
- // [syserr.errcondition.modifiers] modifiers:
21
  void assign(int val, const error_category& cat) noexcept;
22
  template <class ErrorConditionEnum>
23
  error_condition& operator=(ErrorConditionEnum e) noexcept;
24
  void clear() noexcept;
25
 
26
- // [syserr.errcondition.observers] observers:
27
  int value() const noexcept;
28
  const error_category& category() const noexcept;
29
  string message() const;
30
  explicit operator bool() const noexcept;
31
 
32
  private:
33
  int val_; // exposition only
34
  const error_category* cat_; // exposition only
35
  };
36
-
37
- // [syserr.errcondition.nonmembers] non-member functions:
38
- bool operator<(const error_condition& lhs, const error_condition& rhs) noexcept;
39
- } // namespace std
40
  ```
41
 
42
  #### Class `error_condition` constructors <a id="syserr.errcondition.constructors">[[syserr.errcondition.constructors]]</a>
43
 
44
  ``` cpp
@@ -62,14 +61,16 @@ template <class ErrorConditionEnum>
62
  error_condition(ErrorConditionEnum e) noexcept;
63
  ```
64
 
65
  *Effects:* Constructs an object of type `error_condition`.
66
 
67
- `*this == make_error_condition(e)`.
68
 
69
- *Remarks:* This constructor shall not participate in overload resolution
70
- unless `is_error_condition_enum<ErrorConditionEnum>::value` is `true`.
 
 
71
 
72
  #### Class `error_condition` modifiers <a id="syserr.errcondition.modifiers">[[syserr.errcondition.modifiers]]</a>
73
 
74
  ``` cpp
75
  void assign(int val, const error_category& cat) noexcept;
@@ -80,16 +81,18 @@ void assign(int val, const error_category& cat) noexcept;
80
  ``` cpp
81
  template <class ErrorConditionEnum>
82
  error_condition& operator=(ErrorConditionEnum e) noexcept;
83
  ```
84
 
85
- `*this == make_error_condition(e)`.
86
 
87
  *Returns:* `*this`.
88
 
89
- *Remarks:* This operator shall not participate in overload resolution
90
- unless `is_error_condition_enum<ErrorConditionEnum>::value` is `true`.
 
 
91
 
92
  ``` cpp
93
  void clear() noexcept;
94
  ```
95
 
@@ -127,13 +130,5 @@ explicit operator bool() const noexcept;
127
  error_condition make_error_condition(errc e) noexcept;
128
  ```
129
 
130
  *Returns:* `error_condition(static_cast<int>(e), generic_category())`.
131
 
132
- ``` cpp
133
- bool operator<(const error_condition& lhs, const error_condition& rhs) noexcept;
134
- ```
135
-
136
- *Returns:*
137
- `lhs.category() < rhs.category() || lhs.category() == rhs.category() &&`
138
- `lhs.value() < rhs.value()`.
139
-
 
1
  ### Class `error_condition` <a id="syserr.errcondition">[[syserr.errcondition]]</a>
2
 
3
  #### Class `error_condition` overview <a id="syserr.errcondition.overview">[[syserr.errcondition.overview]]</a>
4
 
5
  The class `error_condition` describes an object used to hold values
6
+ identifying error conditions.
7
+
8
+ [*Note 1*: `error_condition` values are portable abstractions, while
9
+ `error_code` values ([[syserr.errcode]]) are implementation
10
+ specific. — *end note*]
11
 
12
  ``` cpp
13
  namespace std {
14
  class error_condition {
15
  public:
16
+ // [syserr.errcondition.constructors], constructors
17
  error_condition() noexcept;
18
  error_condition(int val, const error_category& cat) noexcept;
19
  template <class ErrorConditionEnum>
20
  error_condition(ErrorConditionEnum e) noexcept;
21
 
22
+ // [syserr.errcondition.modifiers], modifiers
23
  void assign(int val, const error_category& cat) noexcept;
24
  template <class ErrorConditionEnum>
25
  error_condition& operator=(ErrorConditionEnum e) noexcept;
26
  void clear() noexcept;
27
 
28
+ // [syserr.errcondition.observers], observers
29
  int value() const noexcept;
30
  const error_category& category() const noexcept;
31
  string message() const;
32
  explicit operator bool() const noexcept;
33
 
34
  private:
35
  int val_; // exposition only
36
  const error_category* cat_; // exposition only
37
  };
38
+ }
 
 
 
39
  ```
40
 
41
  #### Class `error_condition` constructors <a id="syserr.errcondition.constructors">[[syserr.errcondition.constructors]]</a>
42
 
43
  ``` cpp
 
61
  error_condition(ErrorConditionEnum e) noexcept;
62
  ```
63
 
64
  *Effects:* Constructs an object of type `error_condition`.
65
 
66
+ *Postconditions:* `*this == make_error_condition(e)`.
67
 
68
+ *Remarks:*
69
+
70
+ This constructor shall not participate in overload resolution unless
71
+ `is_error_condition_enum_v<ErrorConditionEnum>` is `true`.
72
 
73
  #### Class `error_condition` modifiers <a id="syserr.errcondition.modifiers">[[syserr.errcondition.modifiers]]</a>
74
 
75
  ``` cpp
76
  void assign(int val, const error_category& cat) noexcept;
 
81
  ``` cpp
82
  template <class ErrorConditionEnum>
83
  error_condition& operator=(ErrorConditionEnum e) noexcept;
84
  ```
85
 
86
+ *Postconditions:* `*this == make_error_condition(e)`.
87
 
88
  *Returns:* `*this`.
89
 
90
+ *Remarks:*
91
+
92
+ This operator shall not participate in overload resolution unless
93
+ `is_error_condition_enum_v<ErrorConditionEnum>` is `true`.
94
 
95
  ``` cpp
96
  void clear() noexcept;
97
  ```
98
 
 
130
  error_condition make_error_condition(errc e) noexcept;
131
  ```
132
 
133
  *Returns:* `error_condition(static_cast<int>(e), generic_category())`.
134