Skip to content

Commit 1452231

Browse files
authored
Merge 2025-06 LWG Motion 33
P3697R1 Minor additions to C++26 standard library hardening
2 parents 5fd338c + 68a1632 commit 1452231

File tree

5 files changed

+40
-32
lines changed

5 files changed

+40
-32
lines changed

source/diagnostics.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,7 +2034,7 @@
20342034
Let \tcode{n} be \tcode{t.size()}.
20352035

20362036
\pnum
2037-
\expects
2037+
\hardexpects
20382038
\tcode{skip <= skip + max_depth} is \tcode{true}.
20392039

20402040
\pnum
@@ -2213,7 +2213,7 @@
22132213

22142214
\begin{itemdescr}
22152215
\pnum
2216-
\expects
2216+
\hardexpects
22172217
\tcode{frame_no < size()} is \tcode{true}.
22182218

22192219
\pnum

source/iterators.tex

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5580,7 +5580,7 @@
55805580

55815581
\begin{itemdescr}
55825582
\pnum
5583-
\expects
5583+
\hardexpects
55845584
\tcode{x.v_.valueless_by_exception()} is \tcode{false}.
55855585

55865586
\pnum
@@ -5600,7 +5600,7 @@
56005600

56015601
\begin{itemdescr}
56025602
\pnum
5603-
\expects
5603+
\hardexpects
56045604
\tcode{x.v_.valueless_by_exception()} is \tcode{false}.
56055605

56065606
\pnum
@@ -5630,7 +5630,7 @@
56305630

56315631
\begin{itemdescr}
56325632
\pnum
5633-
\expects
5633+
\hardexpects
56345634
\tcode{holds_alternative<I>(v_)} is \tcode{true}.
56355635

56365636
\pnum
@@ -5655,7 +5655,7 @@
56555655
\end{codeblock}
56565656

56575657
\pnum
5658-
\expects
5658+
\hardexpects
56595659
\tcode{holds_alternative<I>(v_)} is \tcode{true}.
56605660

56615661
\pnum
@@ -5700,7 +5700,7 @@
57005700

57015701
\begin{itemdescr}
57025702
\pnum
5703-
\expects
5703+
\hardexpects
57045704
\tcode{holds_alternative<I>(v_)} is \tcode{true}.
57055705

57065706
\pnum
@@ -5719,7 +5719,7 @@
57195719

57205720
\begin{itemdescr}
57215721
\pnum
5722-
\expects
5722+
\hardexpects
57235723
\tcode{holds_alternative<I>(v_)} is \tcode{true}.
57245724

57255725
\pnum
@@ -5774,7 +5774,7 @@
57745774

57755775
\begin{itemdescr}
57765776
\pnum
5777-
\expects
5777+
\hardexpects
57785778
\tcode{x.v_.valueless_by_exception()} and \tcode{y.v_.valueless_by_exception()}
57795779
are each \tcode{false}.
57805780

@@ -5795,7 +5795,7 @@
57955795

57965796
\begin{itemdescr}
57975797
\pnum
5798-
\expects
5798+
\hardexpects
57995799
\tcode{x.v_.valueless_by_exception()} and \tcode{y.v_.valueless_by_exception()}
58005800
are each \tcode{false}.
58015801

@@ -5816,7 +5816,7 @@
58165816

58175817
\begin{itemdescr}
58185818
\pnum
5819-
\expects
5819+
\hardexpects
58205820
\tcode{x.v_.valueless_by_exception()} and \tcode{y.v_.valueless_by_exception()}
58215821
are each \tcode{false}.
58225822

@@ -5838,7 +5838,7 @@
58385838

58395839
\begin{itemdescr}
58405840
\pnum
5841-
\expects
5841+
\hardexpects
58425842
\tcode{holds_alternative<I>(i.v_)} is \tcode{true}.
58435843

58445844
\pnum
@@ -5855,7 +5855,7 @@
58555855

58565856
\begin{itemdescr}
58575857
\pnum
5858-
\expects
5858+
\hardexpects
58595859
\tcode{holds_alternative<I>(x.v_)} and \tcode{holds_alternative<I2>(y.v_)}
58605860
are each \tcode{true}.
58615861

@@ -6020,8 +6020,8 @@
60206020

60216021
\begin{itemdescr}
60226022
\pnum
6023-
\expects
6024-
\tcode{n >= 0}.
6023+
\hardexpects
6024+
\tcode{n >= 0} is \tcode{true}.
60256025

60266026
\pnum
60276027
\effects
@@ -6107,7 +6107,7 @@
61076107

61086108
\begin{itemdescr}
61096109
\pnum
6110-
\expects
6110+
\hardexpects
61116111
\tcode{length > 0} is \tcode{true}.
61126112

61136113
\pnum
@@ -6135,8 +6135,8 @@
61356135

61366136
\begin{itemdescr}
61376137
\pnum
6138-
\expects
6139-
\tcode{n < length}.
6138+
\hardexpects
6139+
\tcode{n < length} is \tcode{true}.
61406140

61416141
\pnum
61426142
\effects
@@ -6152,8 +6152,8 @@
61526152

61536153
\begin{itemdescr}
61546154
\pnum
6155-
\expects
6156-
\tcode{length > 0}.
6155+
\hardexpects
6156+
\tcode{length > 0} is \tcode{true}.
61576157

61586158
\pnum
61596159
\effects
@@ -6172,8 +6172,8 @@
61726172

61736173
\begin{itemdescr}
61746174
\pnum
6175-
\expects
6176-
\tcode{length > 0}.
6175+
\hardexpects
6176+
\tcode{length > 0} is \tcode{true}.
61776177

61786178
\pnum
61796179
\effects
@@ -6269,8 +6269,8 @@
62696269

62706270
\begin{itemdescr}
62716271
\pnum
6272-
\expects
6273-
\tcode{n <= length}.
6272+
\hardexpects
6273+
\tcode{n <= length} is \tcode{true}.
62746274

62756275
\pnum
62766276
\effects
@@ -6345,8 +6345,8 @@
63456345

63466346
\begin{itemdescr}
63476347
\pnum
6348-
\expects
6349-
\tcode{-n <= length}.
6348+
\hardexpects
6349+
\tcode{-n <= length} is \tcode{true}.
63506350

63516351
\pnum
63526352
\effects
@@ -6426,7 +6426,7 @@
64266426

64276427
\begin{itemdescr}
64286428
\pnum
6429-
\expects
6429+
\hardexpects
64306430
\tcode{i.length > 0} is \tcode{true}.
64316431

64326432
\pnum
@@ -6444,7 +6444,7 @@
64446444

64456445
\begin{itemdescr}
64466446
\pnum
6447-
\expects
6447+
\hardexpects
64486448
Both \tcode{x.length > 0} and \tcode{y.length > 0} are \tcode{true}.
64496449

64506450
\pnum

source/memory.tex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4093,8 +4093,11 @@
40934093
\begin{itemdescr}
40944094
\pnum
40954095
\expects
4096-
\tcode{get() != nullptr \&\& i >= 0}.
4097-
If \tcode{T} is \tcode{U[N]}, \tcode{i < N}.
4096+
\tcode{get() != nullptr} is \tcode{true}.
4097+
4098+
\pnum
4099+
\hardexpects
4100+
$\tcode{i} \ge 0$. If \tcode{T} is \tcode{U[N]}, $\tcode{i} < \tcode{N}$.
40984101

40994102
\pnum
41004103
\returns

source/ranges.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@
18891889

18901890
\begin{itemdescr}
18911891
\pnum
1892-
\expects
1892+
\hardexpects
18931893
\tcode{!empty()} is \tcode{true}.
18941894

18951895
\pnum
@@ -1906,7 +1906,7 @@
19061906

19071907
\begin{itemdescr}
19081908
\pnum
1909-
\expects
1909+
\hardexpects
19101910
\tcode{!empty()} is \tcode{true}.
19111911

19121912
\pnum

source/support.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,19 +880,24 @@
880880
Additionally, each of the following macros is defined in a hardened implementation:
881881
\begin{codeblock}
882882
#define @\defnlibxname{cpp_lib_hardened_array}@ 202502L // also in \libheader{array}
883+
#define @\defnlibxname{cpp_lib_hardened_basic_stacktrace}@ 202506L // also in \libheader{stacktrace}
883884
#define @\defnlibxname{cpp_lib_hardened_basic_string}@ 202502L // also in \libheader{string}
884885
#define @\defnlibxname{cpp_lib_hardened_basic_string_view}@ 202502L // also in \libheader{string_view}
885886
#define @\defnlibxname{cpp_lib_hardened_bitset}@ 202502L // also in \libheader{bitset}
887+
#define @\defnlibxname{cpp_lib_hardened_common_iterator}@ 202506L // also in \libheader{iterator}
888+
#define @\defnlibxname{cpp_lib_hardened_counted_iterator}@ 202506L // also in \libheader{iterator}
886889
#define @\defnlibxname{cpp_lib_hardened_deque}@ 202502L // also in \libheader{deque}
887890
#define @\defnlibxname{cpp_lib_hardened_expected}@ 202502L // also in \libheader{expected}
888891
#define @\defnlibxname{cpp_lib_hardened_forward_list}@ 202502L // also in \libheader{forward_list}
889892
#define @\defnlibxname{cpp_lib_hardened_inplace_vector}@ 202502L // also in \libheader{inplace_vector}
890893
#define @\defnlibxname{cpp_lib_hardened_list}@ 202502L // also in \libheader{list}
891894
#define @\defnlibxname{cpp_lib_hardened_mdspan}@ 202502L // also in \libheader{mdspan}
892895
#define @\defnlibxname{cpp_lib_hardened_optional}@ 202502L // also in \libheader{optional}
896+
#define @\defnlibxname{cpp_lib_hardened_shared_ptr_array}@ 202506L // also in \libheader{memory}
893897
#define @\defnlibxname{cpp_lib_hardened_span}@ 202502L // also in \libheader{span}
894898
#define @\defnlibxname{cpp_lib_hardened_valarray}@ 202502L // also in \libheader{valarray}
895899
#define @\defnlibxname{cpp_lib_hardened_vector}@ 202502L // also in \libheader{vector}
900+
#define @\defnlibxname{cpp_lib_hardened_view_interface}@ 202506L // also in \libheader{ranges}
896901
\end{codeblock}
897902

898903
\pnum

0 commit comments

Comments
 (0)