From b28d744b96d33068d19320ad585af19e147ebacb Mon Sep 17 00:00:00 2001 From: "S. B. Tam" Date: Mon, 1 Sep 2025 09:57:08 +0800 Subject: [PATCH 1/4] [istream.sentry] Minor tweaks --- source/iostreams.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/iostreams.tex b/source/iostreams.tex index edbd0554b0..bff37ffc25 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -4571,7 +4571,7 @@ that are part of the library. The semantics of the constructor used in user code is as specified. \end{footnote} -If \tcode{noskipws} is zero and +If \tcode{noskipws} is \tcode{false} and \tcode{is.flags() \& ios_base::skipws} is nonzero, the function extracts and discards each character as long as the next available input character \tcode{c} is a whitespace character. @@ -4600,8 +4600,8 @@ To decide if the character \tcode{c} is a whitespace character, the constructor performs as if it executes the following code fragment: \begin{codeblock} -const ctype& ctype = use_facet>(is.getloc()); -if (ctype.is(ctype.space, c) != 0) +const ctype& ct = use_facet>(is.getloc()); +if (ct.is(ct.space, c)) // \tcode{c} is a whitespace character. \end{codeblock} @@ -4610,7 +4610,7 @@ \tcode{is.good()} is \tcode{true}, -\tcode{\exposid{ok_} != false} +\tcode{\exposid{ok_} != false}; otherwise, \tcode{\exposid{ok_} == false}. During preparation, the constructor may call From 61aaf2ef8a80eda636b00df5e1d2c823af5150a4 Mon Sep 17 00:00:00 2001 From: "S. B. Tam" Date: Wed, 19 Nov 2025 17:14:17 +0800 Subject: [PATCH 2/4] Address review comments --- source/iostreams.tex | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/source/iostreams.tex b/source/iostreams.tex index bff37ffc25..e25628aba4 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -4585,13 +4585,11 @@ \tcode{setstate(failbit | eofbit)} (which may throw \tcode{ios_base::failure}). +After any preparation is completed, \exposid{ok_} is set to the value of \tcode{is.good()}. \pnum \remarks -The constructor -\begin{codeblock} -explicit sentry(basic_istream& is, bool noskipws = false) -\end{codeblock} +This constructor uses the currently imbued locale in \tcode{is}, to determine whether the next input character is whitespace or not. @@ -4606,13 +4604,6 @@ \end{codeblock} \pnum -If, after any preparation is completed, -\tcode{is.good()} -is -\tcode{true}, -\tcode{\exposid{ok_} != false}; -otherwise, -\tcode{\exposid{ok_} == false}. During preparation, the constructor may call \tcode{setstate(failbit)} (which may throw From a41ccee0404cd20cff502fadb930ba5ae97a7156 Mon Sep 17 00:00:00 2001 From: "S. B. Tam" Date: Thu, 20 Nov 2025 09:58:40 +0800 Subject: [PATCH 3/4] Address review comments Clarify whitespace character determination in constructor --- source/iostreams.tex | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/source/iostreams.tex b/source/iostreams.tex index e25628aba4..fe64f66155 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -4585,23 +4585,13 @@ \tcode{setstate(failbit | eofbit)} (which may throw \tcode{ios_base::failure}). -After any preparation is completed, \exposid{ok_} is set to the value of \tcode{is.good()}. \pnum -\remarks -This constructor -uses the currently imbued locale in \tcode{is}, -to determine whether the next input character is -whitespace or not. - -\pnum -To decide if the character \tcode{c} is a whitespace character, -the constructor performs as if it executes the following code fragment: -\begin{codeblock} -const ctype& ct = use_facet>(is.getloc()); -if (ct.is(ct.space, c)) - // \tcode{c} is a whitespace character. -\end{codeblock} +The currently imbued locale in \tcode{is} is used +to determine whether or not the next input character is whitespace. +The character \tcode{c} is a whitespace character if +\tcode{ct.is(ct.space, c)} is \tcode{true}, +where \tcode{ct} is \tcode{use_facet>(is.getloc())}. \pnum During preparation, the constructor may call @@ -4616,6 +4606,9 @@ \indextext{implementation-dependent}% implementation-dependent operations. \end{footnote} + +\pnum +After any preparation is completed, \exposid{ok_} is set to the value of \tcode{is.good()}. \end{itemdescr} \indexlibrarydtor{sentry}% From 38963ad29447912857b820b5ae0e9edfeed35289 Mon Sep 17 00:00:00 2001 From: "S. B. Tam" Date: Sat, 22 Nov 2025 14:49:18 +0800 Subject: [PATCH 4/4] Address review comments --- source/iostreams.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/iostreams.tex b/source/iostreams.tex index fe64f66155..a613f40259 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -4588,8 +4588,8 @@ \pnum The currently imbued locale in \tcode{is} is used -to determine whether or not the next input character is whitespace. -The character \tcode{c} is a whitespace character if +to determine whether the next input character is whitespace: +The character \tcode{c} is a whitespace character if and only if \tcode{ct.is(ct.space, c)} is \tcode{true}, where \tcode{ct} is \tcode{use_facet>(is.getloc())}.