-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Improve no_destructor.h #896
base: main
Are you sure you want to change the base?
Conversation
1. Removed dependency on std::aligned_storage (which will be deprecated in C++23; see also cplusplus/papers#197). 2. Removed redundant static_assert's. 3. Guaranteed the placement new-expression calls global operator new.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this contribution! I appreciate the explanation and the link to the C++23 paper.
Can you please add back the static_asserts? If CI still passes with them, I'd like to merge this.
Any chance this can be picked up again? |
@pwnall Would you mind re-reviewing this? |
Most changes were superseded by commit 302786e. @pwnall But I still think there're should be some pedantic changes:
|
std::aligned_storage
(which will be deprecated in C++23; see also P1413 Deprecate std::aligned_storage and std::aligned_union cplusplus/papers#197).static_assert
s.operator new
.