Skip to content

Commit f7bfd17

Browse files
authored
[basic.string] State class invariants about [data(), data() + size()] in the introduction. (#1879)
1 parent 0c0e0c3 commit f7bfd17

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source/strings.tex

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,10 @@
853853

854854
\pnum
855855
In all cases,
856-
\tcode{size() <= capacity()}.
856+
\crange{data()}{data() + size()} is a valid range,
857+
\tcode{data() + size()} points at an object with value \tcode{charT()}
858+
(a ``null terminator''\indextext{string!null terminator}),
859+
and \tcode{size() <= capacity()} is \tcode{true}.
857860

858861
\pnum
859862
The functions described in this Clause can report two
@@ -1202,8 +1205,7 @@
12021205

12031206
\pnum
12041207
\postconditions
1205-
\tcode{data()} is a non-null pointer that is copyable and can have \tcode{0} added
1206-
to it, \tcode{size()} is \tcode{0}, and \tcode{capacity()} is an unspecified value.
1208+
\tcode{size()} is \tcode{0} and \tcode{capacity()} is an unspecified value.
12071209
\end{itemdescr}
12081210

12091211
\indexlibrary{\idxcode{basic_string}!constructor}%

0 commit comments

Comments
 (0)