Skip to content
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

[lib] Avoid 'shall' and 'should' in footnotes. #1986

Merged
merged 1 commit into from Apr 1, 2018

Conversation

jensmaurer
Copy link
Member

Partially addresses #1414.

The integer literal \tcode{\cppver}.\footnote{It is intended that future
The integer literal \tcode{\cppver}.
\begin{note}
It is intended that future
versions of this International Standard will
replace the value of this macro with a greater value.
Non-conforming compilers should use a value with at most
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Directives have a similar ban against "shall"/"should" in notes too...

Copy link
Member

@jwakely jwakely Mar 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is still not allowed by ISO. How about "Non-conforming compilers can use a value ..."?

Or we could drop that part of the note, since it no longer reflects reality. Before C++17 was close to publication some versions of GCC used 201500 to indicate "more than C++14 but less than C++1z", and at one point Clang used 201406.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First, we can't really say something about non-conforming compilers; they're non-conforming anyway. Second, we now have feature-test macros.
So, the update removes the "should" sentence talking about non-conforming compilers.

@tkoeppe tkoeppe added the after-motions Pull request is to be applied after the pending edits from WG21 straw polls have been applied. label Mar 31, 2018
@tkoeppe
Copy link
Contributor

tkoeppe commented Mar 31, 2018

@jwakely, @timsong-cpp: Could you please review this?

@@ -6818,7 +6818,7 @@
elements of \tcode{v}.\footnote{This copy constructor creates
a distinct array rather than an alias.
Implementations in which arrays share storage are permitted, but they
shall implement a copy-on-reference mechanism to ensure that arrays are
would need to implement a copy-on-reference mechanism to ensure that arrays are
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to merge as-is, but I wonder if we should just drop this -- in modern C++ this would also require taking a lock to provide thread-safety for const operations, which seems like a silly thing to bother describing as "permitted".

@zygoloid zygoloid merged commit a7fc1b6 into cplusplus:master Apr 1, 2018
@jensmaurer jensmaurer deleted the b49 branch April 1, 2018 07:48
\tcode{size_t}
(which is what Posix.2 calls
\tcode{ssize_t}).}
is used in most places where ISO C would use \tcode{size_t}.}
Copy link
Member

@jwakely jwakely Oct 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I've only noticed this now, but removing the mention of ssize_t seems unfortunate. Also, what remains of the footnote is a lie. We don't use streamsize for the size of an array new-expression or the size passed to operator new (corresponding to malloc in C), or the length passed to char_traits::compare (memcmp), or "most" other places. Maybe we should qualify this footnote to be specific to I/O in C, or just to places that actually use streamsize e.g.

Most places where streamsize is used would use size_t in ISO C, or ssize_t in POSIX APIs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make a PR so we don't lose track of this? The suggestion sounds good.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorporated into PR #4299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
after-motions Pull request is to be applied after the pending edits from WG21 straw polls have been applied.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants