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

Inconsistent noexcept #1171

Closed
W-E-Brown opened this issue Dec 5, 2016 · 2 comments
Closed

Inconsistent noexcept #1171

W-E-Brown opened this issue Dec 5, 2016 · 2 comments

Comments

@W-E-Brown
Copy link
Contributor

The declarations in [pointer.traits.functions] have inconsistent noexcept specifications: they are inconsistent with each other, and one of them is inconsistent with the relevant part of the synopsis shown above (following [pointer.traits]/1).

@zygoloid
Copy link
Member

zygoloid commented Dec 5, 2016

I don't immediately see the problem. It looks to me like the general version is not noexcept (in both sections), and the pointer specialization is noexcept (in both sections). Given that the former calls arbitrary user code (Ptr::pointer_to(r)) and the latter only calls a known-non-throwing function (addressof(r)), I suspect this is already presented as LWG intended.

@W-E-Brown
Copy link
Contributor Author

Sorry; I must have misread the synopsis. Closing.

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

No branches or pull requests

2 participants