-
Notifications
You must be signed in to change notification settings - Fork 738
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] Replace 'Notes:' elements with regular [ Note: ... -- end note] #1160
Changes from all commits
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 |
---|---|---|
|
@@ -272,13 +272,13 @@ | |
|
||
\end{libreqtab5} | ||
|
||
Notes: the algorithm | ||
\tcode{equal()} | ||
is defined in Clause~\ref{algorithms}. | ||
Those entries marked ``(Note A)'' or ``(Note B)'' | ||
have linear complexity for \tcode{array} and have constant complexity | ||
for all other standard containers. | ||
|
||
\begin{note} | ||
The algorithm \tcode{equal()} is defined in Clause~\ref{algorithms}. | ||
\end{note} | ||
|
||
\pnum | ||
The member function \tcode{size()} returns the number of elements in the container. | ||
The number of elements is defined by the rules of | ||
|
@@ -3230,15 +3230,14 @@ | |
|
||
\begin{itemdescr} | ||
\pnum | ||
\effects As if by \tcode{swap_ranges(begin(), end(), y.begin())}. | ||
\effects Equivalent to \tcode{swap_ranges(begin(), end(), y.begin())}. | ||
|
||
\pnum | ||
\throws Nothing unless one of the element-wise swap calls throws an exception. | ||
|
||
\pnum | ||
\realnote Unlike the \tcode{swap} function for other containers, \tcode{array::swap} | ||
\begin{note} | ||
Unlike the \tcode{swap} function for other containers, \tcode{array::swap} | ||
takes linear time, may exit via an exception, and does not cause iterators to | ||
become associated with the other container. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where are these properties normatively stated? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All I have is Note A and Note B in [container.requirements.general] after the table. Suggestion: This says "As if by swap_ranges" for the effects. Let's change that to "Equivalent to" and we get all the missing pieces for free, and can leave the note as a note. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (The updated version adds the "Equivalent to" a few lines earlier.) |
||
\end{note} | ||
\end{itemdescr} | ||
|
||
\rSec3[array.zero]{Zero sized arrays} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2838,18 +2838,22 @@ | |
all objects with thread storage duration associated with the current thread. | ||
|
||
\pnum | ||
\realnote The supplied lock will be held until the thread exits, and care | ||
\begin{note} | ||
The supplied lock will be held until the thread exits, and care | ||
must be taken to ensure that this does not cause deadlock due to lock | ||
ordering issues. After calling \tcode{notify_all_at_thread_exit} it is | ||
recommended that the thread should be exited as soon as possible, and | ||
that no blocking or time-consuming tasks are run on that thread. | ||
\end{note} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use two separate notes here? Generally I'd like to avoid There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok. |
||
\pnum | ||
\realnote It is the user's responsibility to ensure that waiting threads | ||
\begin{note} | ||
It is the user's responsibility to ensure that waiting threads | ||
do not erroneously assume that the thread has finished if they experience | ||
spurious wakeups. This typically requires that the condition being waited | ||
for is satisfied while holding the lock on \tcode{lk}, and that this lock | ||
is not released and reacquired prior to calling \tcode{notify_all_at_thread_exit}. | ||
\end{note} | ||
\end{itemdescr} | ||
|
||
\rSec2[thread.condition.condvar]{Class \tcode{condition_variable}} | ||
|
@@ -3347,9 +3351,11 @@ | |
|
||
\begin{itemdescr} | ||
\pnum | ||
\realnote if any of the \tcode{wait} functions exits via an exception, it is | ||
\begin{note} | ||
If any of the \tcode{wait} functions exits via an exception, it is | ||
unspecified whether the \tcode{Lock} is held. One can use a \tcode{Lock} type | ||
that allows to query that, such as the \tcode{unique_lock} wrapper. | ||
\end{note} | ||
|
||
\pnum | ||
\effects | ||
|
@@ -4248,8 +4254,10 @@ | |
|
||
\begin{itemdescr} | ||
\pnum | ||
\realnote as described above, the template and its two required specializations differ only in | ||
\begin{note} | ||
As described above, the template and its two required specializations differ only in | ||
the return type and return value of the member function \tcode{get}. | ||
\end{note} | ||
|
||
\pnum | ||
\effects | ||
|
@@ -4554,13 +4562,17 @@ | |
|
||
\begin{itemdescr} | ||
\pnum | ||
\realnote as described above, the template and its two required specializations differ only in | ||
\begin{note} | ||
As described above, the template and its two required specializations differ only in | ||
the return type and return value of the member function \tcode{get}. | ||
\end{note} | ||
|
||
\pnum | ||
\realnote access to a value object stored in the shared state is | ||
\begin{note} | ||
Access to a value object stored in the shared state is | ||
unsynchronized, so programmers should apply only those operations on \tcode{R} that do not | ||
introduce a data race~(\ref{intro.multithread}). | ||
\end{note} | ||
|
||
\pnum | ||
\effects \tcode{wait()}{s} until the shared state is ready, then retrieves the | ||
|
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.
This second sentence is normative, and should not be within the note.
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.
Agreed.