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] Canonicalize order of library descriptive elements. #4067
Conversation
What are those 6 remaining cases? I remember @zygoloid mentioning some that needed LWG attention because their order may have been intended and reordering the elements could change the interpretation of the content being described. |
Remaining cases: iostreams.tex:3703-3794: bad element ordering: returns remarks effects |
Maybe I actually meant this comment by @jensmaurer: #2209 (comment). I'm still looking for it, just in case. |
This particular concern has been addressed by the "mandating" papers. |
See thread starting at https://lists.isocpp.org/lib/2020/02/15447.php. |
source/algorithms.tex
Outdated
\pnum | ||
\expects |
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.
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.
Similar changes in this PR didn't dropped the \expects
and not the \pnum
, so perhaps that would do here.
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.
Fixed.
source/strings.tex
Outdated
would exceed \tcode{max_size()} (see below), or | ||
\item any exceptions thrown by \tcode{allocator_traits<Allocator>::allocate}. | ||
\end{itemize} | ||
|
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.
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.
Fixed.
source/strings.tex
Outdated
\begin{itemize} | ||
\item \tcode{out_of_range} if \tcode{pos1 > size()}, | ||
\item \tcode{length_error} if the length of the resulting string | ||
would exceed \tcode{max_size()} (see below), or |
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.
max_size()
is defined above, so maybe the "see below" refers to the now above Effects: for when the length would exceed max_size()
, which should be redundant given [string.require]p1.
would exceed \tcode{max_size()} (see below), or | |
would exceed \tcode{max_size()} (see above), or |
would exceed \tcode{max_size()} (see below), or | |
would exceed \tcode{max_size()}, or |
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.
Fixed (second option)
source/strings.tex
Outdated
\begin{itemize} | ||
\item \tcode{out_of_range} if \tcode{pos1 > size()}, | ||
\item \tcode{length_error} if the length of the resulting string | ||
would exceed \tcode{max_size()} (see below), or |
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.
Same concern as https://github.com/cplusplus/draft/pull/4067/files#r449724740.
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.
Fixed.
\expects | ||
If an implementation has strict pointer safety\iref{basic.stc.dynamic.safety} | ||
then \tcode{ptr} is a safely-derived pointer. | ||
|
||
\pnum | ||
\expects |
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.
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.
I think we do both styles. @jwakely , any opinion here?
3b4ca85
to
32ddb62
Compare
@timsong-cpp , I've removed the reordering of the two mandates/constraints pairs that are the subject of the references reflector thread. |
Ah, that reminds me where it was: #3788 (comment). |
After the reversions, the remaining ordering violations are: iostreams.tex:3703-3794: bad element ordering: returns remarks effects |
Partially addresses #3677
(There are 6 remaining mis-orderings that need more attention.)