From 79af02dd0d2a24d809fa02510778122e49fbd2f0 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Wed, 27 Nov 2024 14:05:35 +0100 Subject: [PATCH] P2862R1 text_encoding::name() should never return null values --- source/text.tex | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/text.tex b/source/text.tex index 067ff01944..e911dba7c3 100644 --- a/source/text.tex +++ b/source/text.tex @@ -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} @@ -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}