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] Replace 'Notes:' elements with regular [ Note: ... -- end note] #1160

Merged
merged 1 commit into from Feb 4, 2017

Conversation

jensmaurer
Copy link
Member

Remove the \realnotes and \realnote macros.
No longer mention 'Notes:' in [structure.specifications].

Fixes #492.

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 1, 2016

Looks good, but I'll let @zygoloid handle it, since it's a fairly substantial change.

Notes: the algorithm
\tcode{equal()}
\begin{note}
The algorithm \tcode{equal()}
is defined in Clause~\ref{algorithms}.
Those entries marked ``(Note A)'' or ``(Note B)''
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed.

@@ -3236,9 +3237,11 @@
\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.
Copy link
Member

Choose a reason for hiding this comment

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

Where are these properties normatively stated?

Copy link
Member Author

Choose a reason for hiding this comment

The 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.

Copy link
Member Author

Choose a reason for hiding this comment

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

(The updated version adds the "Equivalent to" a few lines earlier.)

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.

\pnum
\realnote It is the user's responsibility to ensure that waiting threads
Copy link
Member

Choose a reason for hiding this comment

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

Use two separate notes here? Generally I'd like to avoid \pnums within a note.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok.

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}
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 not entirely comfortable positioning this between the notify* functions and the wait* functions -- it seems pretty easy to miss here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, reverted to the previous position.

the return type and return value of the member function \tcode{get}.

\pnum
\realnote access to a value object stored in the shared state is
Copy link
Member

Choose a reason for hiding this comment

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

Again, please avoid the \pnum within a note here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok.

Remove the \realnotes and \realnote macros.
No longer mention 'Notes:' in [structure.specifications].

Fixes cplusplus#492.
@jensmaurer
Copy link
Member Author

Updated.

@zygoloid zygoloid merged commit 23d7399 into cplusplus:master Feb 4, 2017
@jensmaurer jensmaurer deleted the b6 branch February 5, 2017 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants