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

Cleanup "partial specializations" language in [atomics.syn] #1335

Merged
merged 1 commit into from Feb 5, 2017
Merged

Cleanup "partial specializations" language in [atomics.syn] #1335

merged 1 commit into from Feb 5, 2017

Conversation

BillyONeal
Copy link
Contributor

They aren't partial specializations -- there are no partial specializations of function templates.

@@ -154,7 +154,7 @@
@\placeholdernc{integral}@ atomic_fetch_xor_explicit(volatile @\placeholder{atomic-integral}@*@\itcorr[-1]@, @\placeholdernc{integral}@, memory_order) noexcept;
@\placeholdernc{integral}@ atomic_fetch_xor_explicit(@\placeholder{atomic-integral}@*@\itcorr[-1]@, @\placeholdernc{integral}@, memory_order) noexcept;

// \ref{atomics.types.operations.pointer}, partial specializations for pointers
// \ref{atomics.types.operations.pointer}, nonmember overloads for atomic<T*>
Copy link
Contributor

Choose a reason for hiding this comment

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

This should say non-member, with a hyphen.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, see "Spelling Conventions" in our wiki:
https://github.com/cplusplus/draft/wiki/Specification-Style-Guidelines

@@ -154,7 +154,7 @@
@\placeholdernc{integral}@ atomic_fetch_xor_explicit(volatile @\placeholder{atomic-integral}@*@\itcorr[-1]@, @\placeholdernc{integral}@, memory_order) noexcept;
@\placeholdernc{integral}@ atomic_fetch_xor_explicit(@\placeholder{atomic-integral}@*@\itcorr[-1]@, @\placeholdernc{integral}@, memory_order) noexcept;

// \ref{atomics.types.operations.pointer}, partial specializations for pointers
// \ref{atomics.types.operations.pointer}, nonmember overloads for atomic<T*>
template <class T>
Copy link
Member

Choose a reason for hiding this comment

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

29.6.4 [atomics.types.operations.pointer] is the section referred to, and it also talks about partial specializations. These should be fixed together.

@@ -798,7 +798,7 @@

\pnum
The implementation shall provide the function template specializations
Copy link
Contributor

Choose a reason for hiding this comment

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

Think we need to strike "specializations" here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Err, replace "function template specializations" with "function templates."

Copy link
Member

Choose a reason for hiding this comment

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

Yes.

In any case, these provisions are mostly vacuous. We have general wording in the library front matter that says exactly that: If the standard shows a signature, the implementation is required to provide a definition for it. I'd also appreciate a cleanup of the funny "integral-type" descriptions. I'm not totally clear when the text here prescribes a non-template overload or a (full) specialization of a function template. But that's for another day.

Copy link
Contributor Author

@BillyONeal BillyONeal Jan 5, 2017

Choose a reason for hiding this comment

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

@jensmaurer As far as I can tell only the atomic_fetch_KEY and atomic_fetch_KEY_explicit nonmembers need to be explicit specializations. Although the wording that allows them to be mapped to a base class of atomic means it might be unobservable, because the user can't name the base class (and so can't take its address).

@jensmaurer
Copy link
Member

Could you please squash the commits (i.e. make them a single commit)? Thanks.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jan 10, 2017

(@jensmaurer: If the whole change goes into a single commit, we can also squash it at merge time these days. It's still nice if authors prepare PRs in a way that's ready as is, but it's not longer strictly mandatory.)

@jensmaurer
Copy link
Member

@tkoeppe: Ok. However: Maybe I haven't found the right button yet, but I'd appreciate to see the net change for this pull request, and all I'm seeing appear to be partial changes.

@zygoloid zygoloid merged commit 73b2294 into cplusplus:master Feb 5, 2017
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

5 participants