Skip to content

Commit 1dd4db8

Browse files
authored
Merge 2025-02 LWG Motion 7
P3378R2 constexpr exception types
2 parents 0d4cceb + 7b9506a commit 1dd4db8

File tree

4 files changed

+78
-69
lines changed

4 files changed

+78
-69
lines changed

source/diagnostics.tex

+36-36
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
namespace std {
8383
class logic_error : public exception {
8484
public:
85-
explicit logic_error(const string& what_arg);
86-
explicit logic_error(const char* what_arg);
85+
constexpr explicit logic_error(const string& what_arg);
86+
constexpr explicit logic_error(const char* what_arg);
8787
};
8888
}
8989
\end{codeblock}
@@ -98,7 +98,7 @@
9898

9999
\indexlibraryctor{logic_error}%
100100
\begin{itemdecl}
101-
logic_error(const string& what_arg);
101+
constexpr logic_error(const string& what_arg);
102102
\end{itemdecl}
103103

104104
\begin{itemdescr}
@@ -109,7 +109,7 @@
109109

110110
\indexlibraryctor{logic_error}%
111111
\begin{itemdecl}
112-
logic_error(const char* what_arg);
112+
constexpr logic_error(const char* what_arg);
113113
\end{itemdecl}
114114

115115
\begin{itemdescr}
@@ -125,8 +125,8 @@
125125
namespace std {
126126
class domain_error : public logic_error {
127127
public:
128-
explicit domain_error(const string& what_arg);
129-
explicit domain_error(const char* what_arg);
128+
constexpr explicit domain_error(const string& what_arg);
129+
constexpr explicit domain_error(const char* what_arg);
130130
};
131131
}
132132
\end{codeblock}
@@ -139,7 +139,7 @@
139139

140140
\indexlibraryctor{domain_error}%
141141
\begin{itemdecl}
142-
domain_error(const string& what_arg);
142+
constexpr domain_error(const string& what_arg);
143143
\end{itemdecl}
144144

145145
\begin{itemdescr}
@@ -150,7 +150,7 @@
150150

151151
\indexlibraryctor{domain_error}%
152152
\begin{itemdecl}
153-
domain_error(const char* what_arg);
153+
constexpr domain_error(const char* what_arg);
154154
\end{itemdecl}
155155

156156
\begin{itemdescr}
@@ -166,8 +166,8 @@
166166
namespace std {
167167
class invalid_argument : public logic_error {
168168
public:
169-
explicit invalid_argument(const string& what_arg);
170-
explicit invalid_argument(const char* what_arg);
169+
constexpr explicit invalid_argument(const string& what_arg);
170+
constexpr explicit invalid_argument(const char* what_arg);
171171
};
172172
}
173173
\end{codeblock}
@@ -179,7 +179,7 @@
179179

180180
\indexlibraryctor{invalid_argument}%
181181
\begin{itemdecl}
182-
invalid_argument(const string& what_arg);
182+
constexpr invalid_argument(const string& what_arg);
183183
\end{itemdecl}
184184

185185
\begin{itemdescr}
@@ -190,7 +190,7 @@
190190

191191
\indexlibraryctor{invalid_argument}%
192192
\begin{itemdecl}
193-
invalid_argument(const char* what_arg);
193+
constexpr invalid_argument(const char* what_arg);
194194
\end{itemdecl}
195195

196196
\begin{itemdescr}
@@ -206,8 +206,8 @@
206206
namespace std {
207207
class length_error : public logic_error {
208208
public:
209-
explicit length_error(const string& what_arg);
210-
explicit length_error(const char* what_arg);
209+
constexpr explicit length_error(const string& what_arg);
210+
constexpr explicit length_error(const char* what_arg);
211211
};
212212
}
213213
\end{codeblock}
@@ -221,7 +221,7 @@
221221

222222
\indexlibraryctor{length_error}%
223223
\begin{itemdecl}
224-
length_error(const string& what_arg);
224+
constexpr length_error(const string& what_arg);
225225
\end{itemdecl}
226226

227227
\begin{itemdescr}
@@ -232,7 +232,7 @@
232232

233233
\indexlibraryctor{length_error}%
234234
\begin{itemdecl}
235-
length_error(const char* what_arg);
235+
constexpr length_error(const char* what_arg);
236236
\end{itemdecl}
237237

238238
\begin{itemdescr}
@@ -248,8 +248,8 @@
248248
namespace std {
249249
class out_of_range : public logic_error {
250250
public:
251-
explicit out_of_range(const string& what_arg);
252-
explicit out_of_range(const char* what_arg);
251+
constexpr explicit out_of_range(const string& what_arg);
252+
constexpr explicit out_of_range(const char* what_arg);
253253
};
254254
}
255255
\end{codeblock}
@@ -263,7 +263,7 @@
263263

264264
\indexlibraryctor{out_of_range}%
265265
\begin{itemdecl}
266-
out_of_range(const string& what_arg);
266+
constexpr out_of_range(const string& what_arg);
267267
\end{itemdecl}
268268

269269
\begin{itemdescr}
@@ -274,7 +274,7 @@
274274

275275
\indexlibraryctor{out_of_range}%
276276
\begin{itemdecl}
277-
out_of_range(const char* what_arg);
277+
constexpr out_of_range(const char* what_arg);
278278
\end{itemdecl}
279279

280280
\begin{itemdescr}
@@ -290,8 +290,8 @@
290290
namespace std {
291291
class runtime_error : public exception {
292292
public:
293-
explicit runtime_error(const string& what_arg);
294-
explicit runtime_error(const char* what_arg);
293+
constexpr explicit runtime_error(const string& what_arg);
294+
constexpr explicit runtime_error(const char* what_arg);
295295
};
296296
}
297297
\end{codeblock}
@@ -304,7 +304,7 @@
304304

305305
\indexlibraryctor{runtime_error}%
306306
\begin{itemdecl}
307-
runtime_error(const string& what_arg);
307+
constexpr runtime_error(const string& what_arg);
308308
\end{itemdecl}
309309

310310
\begin{itemdescr}
@@ -315,7 +315,7 @@
315315

316316
\indexlibraryctor{runtime_error}%
317317
\begin{itemdecl}
318-
runtime_error(const char* what_arg);
318+
constexpr runtime_error(const char* what_arg);
319319
\end{itemdecl}
320320

321321
\begin{itemdescr}
@@ -331,8 +331,8 @@
331331
namespace std {
332332
class range_error : public runtime_error {
333333
public:
334-
explicit range_error(const string& what_arg);
335-
explicit range_error(const char* what_arg);
334+
constexpr explicit range_error(const string& what_arg);
335+
constexpr explicit range_error(const char* what_arg);
336336
};
337337
}
338338
\end{codeblock}
@@ -345,7 +345,7 @@
345345

346346
\indexlibraryctor{range_error}%
347347
\begin{itemdecl}
348-
range_error(const string& what_arg);
348+
constexpr range_error(const string& what_arg);
349349
\end{itemdecl}
350350

351351
\begin{itemdescr}
@@ -356,7 +356,7 @@
356356

357357
\indexlibraryctor{range_error}%
358358
\begin{itemdecl}
359-
range_error(const char* what_arg);
359+
constexpr range_error(const char* what_arg);
360360
\end{itemdecl}
361361

362362
\begin{itemdescr}
@@ -372,8 +372,8 @@
372372
namespace std {
373373
class overflow_error : public runtime_error {
374374
public:
375-
explicit overflow_error(const string& what_arg);
376-
explicit overflow_error(const char* what_arg);
375+
constexpr explicit overflow_error(const string& what_arg);
376+
constexpr explicit overflow_error(const char* what_arg);
377377
};
378378
}
379379
\end{codeblock}
@@ -385,7 +385,7 @@
385385

386386
\indexlibraryctor{overflow_error}%
387387
\begin{itemdecl}
388-
overflow_error(const string& what_arg);
388+
constexpr overflow_error(const string& what_arg);
389389
\end{itemdecl}
390390

391391
\begin{itemdescr}
@@ -396,7 +396,7 @@
396396

397397
\indexlibraryctor{overflow_error}%
398398
\begin{itemdecl}
399-
overflow_error(const char* what_arg);
399+
constexpr overflow_error(const char* what_arg);
400400
\end{itemdecl}
401401

402402
\begin{itemdescr}
@@ -412,8 +412,8 @@
412412
namespace std {
413413
class underflow_error : public runtime_error {
414414
public:
415-
explicit underflow_error(const string& what_arg);
416-
explicit underflow_error(const char* what_arg);
415+
constexpr explicit underflow_error(const string& what_arg);
416+
constexpr explicit underflow_error(const char* what_arg);
417417
};
418418
}
419419
\end{codeblock}
@@ -425,7 +425,7 @@
425425

426426
\indexlibraryctor{underflow_error}%
427427
\begin{itemdecl}
428-
underflow_error(const string& what_arg);
428+
constexpr underflow_error(const string& what_arg);
429429
\end{itemdecl}
430430

431431
\begin{itemdescr}
@@ -436,7 +436,7 @@
436436

437437
\indexlibraryctor{underflow_error}%
438438
\begin{itemdecl}
439-
underflow_error(const char* what_arg);
439+
constexpr underflow_error(const char* what_arg);
440440
\end{itemdecl}
441441

442442
\begin{itemdescr}

source/support.tex

+2-1
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,8 @@
613613
#define @\defnlibxname{cpp_lib_constexpr_complex}@ 202306L // also in \libheader{complex}
614614
#define @\defnlibxname{cpp_lib_constexpr_deque}@ 202502L // also in \libheader{deque}
615615
#define @\defnlibxname{cpp_lib_constexpr_dynamic_alloc}@ 201907L // also in \libheader{memory}
616-
#define @\defnlibxname{cpp_lib_constexpr_exceptions}@ 202411L // also in \libheader{exception}
616+
#define @\defnlibxname{cpp_lib_constexpr_exceptions}@ 202502L
617+
// also in \libheader{exception}, \libheader{stdexcept}, \libheader{expected}, \libheader{optional}, \libheader{variant}, and \libheader{format}
617618
#define @\defnlibxname{cpp_lib_constexpr_flat_map}@ 202502L // also in \libheader{flat_map}
618619
#define @\defnlibxname{cpp_lib_constexpr_flat_set}@ 202502L // also in \libheader{flat_set}
619620
#define @\defnlibxname{cpp_lib_constexpr_forward_list}@ 202502L // also in \libheader{forward_list}

source/text.tex

+4-4
Original file line numberDiff line numberDiff line change
@@ -8958,8 +8958,8 @@
89588958
namespace std {
89598959
class format_error : public runtime_error {
89608960
public:
8961-
explicit format_error(const string& what_arg);
8962-
explicit format_error(const char* what_arg);
8961+
constexpr explicit format_error(const string& what_arg);
8962+
constexpr explicit format_error(const char* what_arg);
89638963
};
89648964
}
89658965
\end{codeblock}
@@ -8970,7 +8970,7 @@
89708970

89718971
\indexlibraryctor{format_error}%
89728972
\begin{itemdecl}
8973-
format_error(const string& what_arg);
8973+
constexpr format_error(const string& what_arg);
89748974
\end{itemdecl}
89758975

89768976
\begin{itemdescr}
@@ -8981,7 +8981,7 @@
89818981
\indexlibraryctor{format_error}%
89828982
\end{itemdescr}
89838983
\begin{itemdecl}
8984-
format_error(const char* what_arg);
8984+
constexpr format_error(const char* what_arg);
89858985
\end{itemdecl}
89868986

89878987
\begin{itemdescr}

0 commit comments

Comments
 (0)