Skip to content

P3037R6 constexpr std::shared_ptr and friends #8010

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

Merged

Conversation

AlisdairM
Copy link
Contributor

Fixes #7941
Fixes cplusplus/papers#1713

Did not apply constexpr to deleted functions. The application in the paper was inconsistent, and I deemed the active uses as errors.

Made minor whitespace and line-breaking adjustments to avoid line-wrapping and overfull hboxes.

Fixed odd use of return type on the same line as the template head for an allocate_shared overload, where it belonged on the same line as the function name, before applying the constexpr keyword.

@AlisdairM
Copy link
Contributor Author

This was not the easiest paper to track wording to the draft sources, so even though the changes are simple, please review carefully to confirm that no constexpr keywords were missed, and similarly that no constexpr keywords were erroneously introduced.

@AlisdairM
Copy link
Contributor Author

As with earlier PRs, there is a problem retaining an inline comment without line-wrapping or overfilling a box if we stick to the 4-space alignment rule. I defer to Thomas to fix this issue when applying the PR.

@AlisdairM AlisdairM force-pushed the apply_p3037_constexpr_shared_ptr_and_friends branch from 6665450 to aa8c1f2 Compare June 25, 2025 13:17
@AlisdairM AlisdairM requested a review from Eisenwave June 25, 2025 13:36
@tkoeppe tkoeppe force-pushed the apply_p3037_constexpr_shared_ptr_and_friends branch from bb6df99 to 85f8816 Compare July 15, 2025 08:27
@tkoeppe tkoeppe force-pushed the apply_p3037_constexpr_shared_ptr_and_friends branch from 85f8816 to c364535 Compare July 15, 2025 10:12
@tkoeppe
Copy link
Contributor

tkoeppe commented Jul 15, 2025

This looks good, thanks a lot, Alisdair!

@tkoeppe tkoeppe merged commit bdb0377 into cplusplus:main Jul 15, 2025
2 checks passed
@AlisdairM AlisdairM deleted the apply_p3037_constexpr_shared_ptr_and_friends branch July 17, 2025 01:54
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.

[2025-06 LWG Motion 4] P3037R6 constexpr std::shared_ptr and friends P3037 R6 constexpr std::shared_ptr and friends
3 participants