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

[unique.ptr, util.smartptr.shared] Remove redundant repetitions of declarations that already appear in the synopsis #1758

Merged
merged 1 commit into from Oct 2, 2017

Conversation

tkoeppe
Copy link
Contributor

@tkoeppe tkoeppe commented Sep 28, 2017

No description provided.

…clarations that already appear in the synopsis
@@ -9186,94 +9131,6 @@

template<class T> shared_ptr(weak_ptr<T>) -> shared_ptr<T>;
template<class T, class D> shared_ptr(unique_ptr<T, D>) -> shared_ptr<T>;
Copy link
Member

Choose a reason for hiding this comment

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

We should figure out what to do with these. My first inclination is to move them from here to the header synopsis, because they're separate top-level declarations (just like make_shared etc). But I think that is an independent cleanup.

Copy link
Member

Choose a reason for hiding this comment

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

But arguably explicit deduction guides are closer to constructors, in that they tell you which forms of initialization would support CTAD. So having them next to the class synopsis (where the constructors appear) has some benefit.

But ... the standard is not a tutorial.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At the moment, all deduction guides appear only with the class definitions, and never in the header synopses. As jwakely says, the deduction guide kind of only makes sense in combination with the constructor overload set, so I'd say that's not unreasonable.

Copy link
Member

@zygoloid zygoloid left a comment

Choose a reason for hiding this comment

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

Looks good.

@tkoeppe tkoeppe merged commit 1c43bc8 into cplusplus:master Oct 2, 2017
AaronBallman pushed a commit to AaronBallman/draft that referenced this pull request Nov 15, 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

3 participants