Implement P2186R2 Removing Garbage Collection Support#2010
Conversation
barcharcraz
left a comment
There was a problem hiding this comment.
Thanks for the PR!
The removal of the feature should be controlled in the same was as we do for features removed in CXX20
See yvals_core.h starting around line 1061 (search for _HAS_FEATURES_REMOVED_IN_CXX20)
Co-authored-by: Casey Carter <[email protected]>
|
|
||
|
|
||
| #ifndef _HAS_FEATURES_REMOVED_IN_CXX23 | ||
| #define _HAS_FEATURES_REMOVED_IN_CXX23 (!_HAS_CXX23) |
There was a problem hiding this comment.
Is that correct. The default would be that those Features are removed.
Semantically this appears to be flipped
There was a problem hiding this comment.
Yes. I think it's correct. It's name for users. If I as user define
#define _HAS_FEATURES_REMOVED_IN_CXX23 1
then include some standard hearders
and then all deleted features in c++23 are available for me.
There was a problem hiding this comment.
Yep, this is correct.
FYI: GitHub doesn't preview line-numbered links to files in main, because as main changes, the line numbers could be invalidated. However, if you press the y keyboard shortcut when viewing a file, the link will transform into a commit permalink, and then citing that in an issue/comment will be previewed. Here, https://github.com/microsoft/STL/blob/1866b848f0175c3361a916680a4318e7f0cc5482/stl/inc/yvals_core.h#L1060-L1063 will be previewed as:
Lines 1060 to 1063 in 1866b84
| default_delete<int[]> dd1{default_delete<int[]>{}}; | ||
| dd1(new int[5]); | ||
|
|
||
| #if _HAS_GARBAGE_COLLECTION_SUPPORT_DELETED_IN_CXX23 |
There was a problem hiding this comment.
Same, I would have expected those to be there if they have not been deleted
There was a problem hiding this comment.
This comment has been minimized.
This comment has been minimized.
|
Thanks for implementing this removal, which will help avoid confusing programmers! 🎉 🎉 🎉 |
Fixes #1988