Skip to content

Commit

Permalink
Merge 2024-11 LWG Motion 6
Browse files Browse the repository at this point in the history
P2862R1 text_encoding::name() should never return null values
  • Loading branch information
tkoeppe authored Dec 16, 2024
2 parents 8df8512 + 79af02d commit 6c6bd99
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions source/text.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5115,7 +5115,7 @@
\tcode{e.mib() == text_encoding::id::other} is \tcode{false}
maintains the following invariants:
\begin{itemize}
\item \tcode{e.name() == nullptr} is \tcode{false}, and
\item \tcode{*e.name() == '\textbackslash 0'} is \tcode{false}, and
\item \tcode{e.mib() == text_encoding(e.name()).mib()} is \tcode{true}.
\end{itemize}

Expand Down Expand Up @@ -5215,13 +5215,10 @@
\begin{itemdescr}
\pnum
\returns
\exposid{name_} if \tcode{(\exposid{name_}[0] != '\textbackslash 0')}
is \tcode{true}, and
\keyword{nullptr} otherwise.
\exposid{name_}.

\pnum
\remarks
If \tcode{name() == nullptr} is \tcode{false},
\tcode{name()} is an \ntbs{} and
accessing elements of \exposid{name_}
outside of the range \countedrange{name()}{strlen(name()) + 1}
Expand Down

0 comments on commit 6c6bd99

Please sign in to comment.