-
Notifications
You must be signed in to change notification settings - Fork 802
[istream.sentry] Minor tweaks #8198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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<charT>& ctype = use_facet<ctype<charT>>(is.getloc()); | ||||||
| if (ctype.is(ctype.space, c) != 0) | ||||||
| const ctype<charT>& ct = use_facet<ctype<charT>>(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}; | ||||||
|
||||||
| \tcode{\exposid{ok_} != false}; | |
| \tcode{\exposid{ok_}} is \tcode{false}; |
The == false below should also be changed for local consistency; then we have local consistency about using "is true"/"is false" in this \itemdescr. Not fixing this would be silly if we're already touching this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original wording is awfully terse. Can we spell this out a bit more, like:
"""
If, after any preparation is completed, is.good() is true, then ok_ is true, otherwise ok_ is false.
"""
Or could we deunpack this even further and say something like "the value of ok_ is is.good()."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well we definitely can't change "ok_ != false" to "ok_ is false"!
I agree with tkoeppe's suggestion, including adding "then" after the third comma.
We could also just say:
After any preparation is completed,
ok_is set to the value ofis.good().
Just saying ok_ = is.good() seems much simpler than describing the following logic, which would never pass code review:
if (is.good() == true)
ok_ = !false;
else
ok_ = false;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything would be better than what's in the draft today ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this sentence should probably be part of the effects instead of remarks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we are here, we can also drop the quote of the constructor signature in the previous paragraph.
Like...it's a Remarks for this constructor. Do we really need to say yet again that we are talking about this constructor?