Skip to content

Commit

Permalink
P2862R1 text_encoding::name() should never return null values
Browse files Browse the repository at this point in the history
  • Loading branch information
jensmaurer committed Nov 27, 2024
1 parent d017ce4 commit 54ba6d2
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 @@ -5113,7 +5113,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 @@ -5213,13 +5213,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 54ba6d2

Please sign in to comment.