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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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.

Fixes cplusplus#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 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
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
2 participants