From Jason Turner

[std.exceptions]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp0_iueoaq/{from.md → to.md} +36 -36
tmp/tmp0_iueoaq/{from.md → to.md} RENAMED
@@ -37,245 +37,245 @@ namespace std {
37
 
38
  ``` cpp
39
  namespace std {
40
  class logic_error : public exception {
41
  public:
42
- explicit logic_error(const string& what_arg);
43
- explicit logic_error(const char* what_arg);
44
  };
45
  }
46
  ```
47
 
48
  The class `logic_error` defines the type of objects thrown as exceptions
49
  to report errors presumably detectable before the program executes, such
50
  as violations of logical preconditions or class invariants.
51
 
52
  ``` cpp
53
- logic_error(const string& what_arg);
54
  ```
55
 
56
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
57
 
58
  ``` cpp
59
- logic_error(const char* what_arg);
60
  ```
61
 
62
  *Ensures:* `strcmp(what(), what_arg) == 0`.
63
 
64
  ### Class `domain_error` <a id="domain.error">[[domain.error]]</a>
65
 
66
  ``` cpp
67
  namespace std {
68
  class domain_error : public logic_error {
69
  public:
70
- explicit domain_error(const string& what_arg);
71
- explicit domain_error(const char* what_arg);
72
  };
73
  }
74
  ```
75
 
76
  The class `domain_error` defines the type of objects thrown as
77
  exceptions by the implementation to report domain errors.
78
 
79
  ``` cpp
80
- domain_error(const string& what_arg);
81
  ```
82
 
83
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
84
 
85
  ``` cpp
86
- domain_error(const char* what_arg);
87
  ```
88
 
89
  *Ensures:* `strcmp(what(), what_arg) == 0`.
90
 
91
  ### Class `invalid_argument` <a id="invalid.argument">[[invalid.argument]]</a>
92
 
93
  ``` cpp
94
  namespace std {
95
  class invalid_argument : public logic_error {
96
  public:
97
- explicit invalid_argument(const string& what_arg);
98
- explicit invalid_argument(const char* what_arg);
99
  };
100
  }
101
  ```
102
 
103
  The class `invalid_argument` defines the type of objects thrown as
104
  exceptions to report an invalid argument.
105
 
106
  ``` cpp
107
- invalid_argument(const string& what_arg);
108
  ```
109
 
110
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
111
 
112
  ``` cpp
113
- invalid_argument(const char* what_arg);
114
  ```
115
 
116
  *Ensures:* `strcmp(what(), what_arg) == 0`.
117
 
118
  ### Class `length_error` <a id="length.error">[[length.error]]</a>
119
 
120
  ``` cpp
121
  namespace std {
122
  class length_error : public logic_error {
123
  public:
124
- explicit length_error(const string& what_arg);
125
- explicit length_error(const char* what_arg);
126
  };
127
  }
128
  ```
129
 
130
  The class `length_error` defines the type of objects thrown as
131
  exceptions to report an attempt to produce an object whose length
132
  exceeds its maximum allowable size.
133
 
134
  ``` cpp
135
- length_error(const string& what_arg);
136
  ```
137
 
138
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
139
 
140
  ``` cpp
141
- length_error(const char* what_arg);
142
  ```
143
 
144
  *Ensures:* `strcmp(what(), what_arg) == 0`.
145
 
146
  ### Class `out_of_range` <a id="out.of.range">[[out.of.range]]</a>
147
 
148
  ``` cpp
149
  namespace std {
150
  class out_of_range : public logic_error {
151
  public:
152
- explicit out_of_range(const string& what_arg);
153
- explicit out_of_range(const char* what_arg);
154
  };
155
  }
156
  ```
157
 
158
  The class `out_of_range` defines the type of objects thrown as
159
  exceptions to report an argument value not in its expected range.
160
 
161
  ``` cpp
162
- out_of_range(const string& what_arg);
163
  ```
164
 
165
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
166
 
167
  ``` cpp
168
- out_of_range(const char* what_arg);
169
  ```
170
 
171
  *Ensures:* `strcmp(what(), what_arg) == 0`.
172
 
173
  ### Class `runtime_error` <a id="runtime.error">[[runtime.error]]</a>
174
 
175
  ``` cpp
176
  namespace std {
177
  class runtime_error : public exception {
178
  public:
179
- explicit runtime_error(const string& what_arg);
180
- explicit runtime_error(const char* what_arg);
181
  };
182
  }
183
  ```
184
 
185
  The class `runtime_error` defines the type of objects thrown as
186
  exceptions to report errors presumably detectable only when the program
187
  executes.
188
 
189
  ``` cpp
190
- runtime_error(const string& what_arg);
191
  ```
192
 
193
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
194
 
195
  ``` cpp
196
- runtime_error(const char* what_arg);
197
  ```
198
 
199
  *Ensures:* `strcmp(what(), what_arg) == 0`.
200
 
201
  ### Class `range_error` <a id="range.error">[[range.error]]</a>
202
 
203
  ``` cpp
204
  namespace std {
205
  class range_error : public runtime_error {
206
  public:
207
- explicit range_error(const string& what_arg);
208
- explicit range_error(const char* what_arg);
209
  };
210
  }
211
  ```
212
 
213
  The class `range_error` defines the type of objects thrown as exceptions
214
  to report range errors in internal computations.
215
 
216
  ``` cpp
217
- range_error(const string& what_arg);
218
  ```
219
 
220
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
221
 
222
  ``` cpp
223
- range_error(const char* what_arg);
224
  ```
225
 
226
  *Ensures:* `strcmp(what(), what_arg) == 0`.
227
 
228
  ### Class `overflow_error` <a id="overflow.error">[[overflow.error]]</a>
229
 
230
  ``` cpp
231
  namespace std {
232
  class overflow_error : public runtime_error {
233
  public:
234
- explicit overflow_error(const string& what_arg);
235
- explicit overflow_error(const char* what_arg);
236
  };
237
  }
238
  ```
239
 
240
  The class `overflow_error` defines the type of objects thrown as
241
  exceptions to report an arithmetic overflow error.
242
 
243
  ``` cpp
244
- overflow_error(const string& what_arg);
245
  ```
246
 
247
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
248
 
249
  ``` cpp
250
- overflow_error(const char* what_arg);
251
  ```
252
 
253
  *Ensures:* `strcmp(what(), what_arg) == 0`.
254
 
255
  ### Class `underflow_error` <a id="underflow.error">[[underflow.error]]</a>
256
 
257
  ``` cpp
258
  namespace std {
259
  class underflow_error : public runtime_error {
260
  public:
261
- explicit underflow_error(const string& what_arg);
262
- explicit underflow_error(const char* what_arg);
263
  };
264
  }
265
  ```
266
 
267
  The class `underflow_error` defines the type of objects thrown as
268
  exceptions to report an arithmetic underflow error.
269
 
270
  ``` cpp
271
- underflow_error(const string& what_arg);
272
  ```
273
 
274
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
275
 
276
  ``` cpp
277
- underflow_error(const char* what_arg);
278
  ```
279
 
280
  *Ensures:* `strcmp(what(), what_arg) == 0`.
281
 
 
37
 
38
  ``` cpp
39
  namespace std {
40
  class logic_error : public exception {
41
  public:
42
+ constexpr explicit logic_error(const string& what_arg);
43
+ constexpr explicit logic_error(const char* what_arg);
44
  };
45
  }
46
  ```
47
 
48
  The class `logic_error` defines the type of objects thrown as exceptions
49
  to report errors presumably detectable before the program executes, such
50
  as violations of logical preconditions or class invariants.
51
 
52
  ``` cpp
53
+ constexpr logic_error(const string& what_arg);
54
  ```
55
 
56
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
57
 
58
  ``` cpp
59
+ constexpr logic_error(const char* what_arg);
60
  ```
61
 
62
  *Ensures:* `strcmp(what(), what_arg) == 0`.
63
 
64
  ### Class `domain_error` <a id="domain.error">[[domain.error]]</a>
65
 
66
  ``` cpp
67
  namespace std {
68
  class domain_error : public logic_error {
69
  public:
70
+ constexpr explicit domain_error(const string& what_arg);
71
+ constexpr explicit domain_error(const char* what_arg);
72
  };
73
  }
74
  ```
75
 
76
  The class `domain_error` defines the type of objects thrown as
77
  exceptions by the implementation to report domain errors.
78
 
79
  ``` cpp
80
+ constexpr domain_error(const string& what_arg);
81
  ```
82
 
83
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
84
 
85
  ``` cpp
86
+ constexpr domain_error(const char* what_arg);
87
  ```
88
 
89
  *Ensures:* `strcmp(what(), what_arg) == 0`.
90
 
91
  ### Class `invalid_argument` <a id="invalid.argument">[[invalid.argument]]</a>
92
 
93
  ``` cpp
94
  namespace std {
95
  class invalid_argument : public logic_error {
96
  public:
97
+ constexpr explicit invalid_argument(const string& what_arg);
98
+ constexpr explicit invalid_argument(const char* what_arg);
99
  };
100
  }
101
  ```
102
 
103
  The class `invalid_argument` defines the type of objects thrown as
104
  exceptions to report an invalid argument.
105
 
106
  ``` cpp
107
+ constexpr invalid_argument(const string& what_arg);
108
  ```
109
 
110
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
111
 
112
  ``` cpp
113
+ constexpr invalid_argument(const char* what_arg);
114
  ```
115
 
116
  *Ensures:* `strcmp(what(), what_arg) == 0`.
117
 
118
  ### Class `length_error` <a id="length.error">[[length.error]]</a>
119
 
120
  ``` cpp
121
  namespace std {
122
  class length_error : public logic_error {
123
  public:
124
+ constexpr explicit length_error(const string& what_arg);
125
+ constexpr explicit length_error(const char* what_arg);
126
  };
127
  }
128
  ```
129
 
130
  The class `length_error` defines the type of objects thrown as
131
  exceptions to report an attempt to produce an object whose length
132
  exceeds its maximum allowable size.
133
 
134
  ``` cpp
135
+ constexpr length_error(const string& what_arg);
136
  ```
137
 
138
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
139
 
140
  ``` cpp
141
+ constexpr length_error(const char* what_arg);
142
  ```
143
 
144
  *Ensures:* `strcmp(what(), what_arg) == 0`.
145
 
146
  ### Class `out_of_range` <a id="out.of.range">[[out.of.range]]</a>
147
 
148
  ``` cpp
149
  namespace std {
150
  class out_of_range : public logic_error {
151
  public:
152
+ constexpr explicit out_of_range(const string& what_arg);
153
+ constexpr explicit out_of_range(const char* what_arg);
154
  };
155
  }
156
  ```
157
 
158
  The class `out_of_range` defines the type of objects thrown as
159
  exceptions to report an argument value not in its expected range.
160
 
161
  ``` cpp
162
+ constexpr out_of_range(const string& what_arg);
163
  ```
164
 
165
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
166
 
167
  ``` cpp
168
+ constexpr out_of_range(const char* what_arg);
169
  ```
170
 
171
  *Ensures:* `strcmp(what(), what_arg) == 0`.
172
 
173
  ### Class `runtime_error` <a id="runtime.error">[[runtime.error]]</a>
174
 
175
  ``` cpp
176
  namespace std {
177
  class runtime_error : public exception {
178
  public:
179
+ constexpr explicit runtime_error(const string& what_arg);
180
+ constexpr explicit runtime_error(const char* what_arg);
181
  };
182
  }
183
  ```
184
 
185
  The class `runtime_error` defines the type of objects thrown as
186
  exceptions to report errors presumably detectable only when the program
187
  executes.
188
 
189
  ``` cpp
190
+ constexpr runtime_error(const string& what_arg);
191
  ```
192
 
193
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
194
 
195
  ``` cpp
196
+ constexpr runtime_error(const char* what_arg);
197
  ```
198
 
199
  *Ensures:* `strcmp(what(), what_arg) == 0`.
200
 
201
  ### Class `range_error` <a id="range.error">[[range.error]]</a>
202
 
203
  ``` cpp
204
  namespace std {
205
  class range_error : public runtime_error {
206
  public:
207
+ constexpr explicit range_error(const string& what_arg);
208
+ constexpr explicit range_error(const char* what_arg);
209
  };
210
  }
211
  ```
212
 
213
  The class `range_error` defines the type of objects thrown as exceptions
214
  to report range errors in internal computations.
215
 
216
  ``` cpp
217
+ constexpr range_error(const string& what_arg);
218
  ```
219
 
220
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
221
 
222
  ``` cpp
223
+ constexpr range_error(const char* what_arg);
224
  ```
225
 
226
  *Ensures:* `strcmp(what(), what_arg) == 0`.
227
 
228
  ### Class `overflow_error` <a id="overflow.error">[[overflow.error]]</a>
229
 
230
  ``` cpp
231
  namespace std {
232
  class overflow_error : public runtime_error {
233
  public:
234
+ constexpr explicit overflow_error(const string& what_arg);
235
+ constexpr explicit overflow_error(const char* what_arg);
236
  };
237
  }
238
  ```
239
 
240
  The class `overflow_error` defines the type of objects thrown as
241
  exceptions to report an arithmetic overflow error.
242
 
243
  ``` cpp
244
+ constexpr overflow_error(const string& what_arg);
245
  ```
246
 
247
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
248
 
249
  ``` cpp
250
+ constexpr overflow_error(const char* what_arg);
251
  ```
252
 
253
  *Ensures:* `strcmp(what(), what_arg) == 0`.
254
 
255
  ### Class `underflow_error` <a id="underflow.error">[[underflow.error]]</a>
256
 
257
  ``` cpp
258
  namespace std {
259
  class underflow_error : public runtime_error {
260
  public:
261
+ constexpr explicit underflow_error(const string& what_arg);
262
+ constexpr explicit underflow_error(const char* what_arg);
263
  };
264
  }
265
  ```
266
 
267
  The class `underflow_error` defines the type of objects thrown as
268
  exceptions to report an arithmetic underflow error.
269
 
270
  ``` cpp
271
+ constexpr underflow_error(const string& what_arg);
272
  ```
273
 
274
  *Ensures:* `strcmp(what(), what_arg.c_str()) == 0`.
275
 
276
  ``` cpp
277
+ constexpr underflow_error(const char* what_arg);
278
  ```
279
 
280
  *Ensures:* `strcmp(what(), what_arg) == 0`.
281