deprecate features adopted into C++#1198
Merged
carsonRadtke merged 3 commits intomicrosoft:mainfrom Feb 14, 2025
Merged
Conversation
1) Mark the following GSL features as deprecated: - gsl::unique_ptr (always) - gsl::shared_ptr (always) - gsl::byte (since c++17) - gsl::joining_thread (never implemented) 2) Refactor existing deprecations to use the new GSL_DEPRECATED(msg) macro. 3) Create a section in the README for deprecated features in the standard.
ac626c0 to
49e86be
Compare
49e86be to
7b3165e
Compare
beinhaerter
reviewed
Feb 22, 2025
Comment on lines
+77
to
+82
| #if GSL_USE_STD_BYTE | ||
| #define BYTE_TYPE std::byte | ||
| #else // !GSL_USE_STD_BYTE | ||
| #define BYTE_TYPE byte | ||
| #endif // GSL_USE_STD_BYTE | ||
|
|
Contributor
There was a problem hiding this comment.
Why is that macro introduced? It was not needed before. Did some code not compile without this macro?
And why is this macro exported?
A macro with a generic name like BYTE_TYPE looks like it has potential to break existing code.
|
|
||
| #include "./assert" // for Expects | ||
| #include "./byte" // for byte | ||
| #include "./byte" // for BYTE_TYPE |
Contributor
There was a problem hiding this comment.
It worries me if that change is necessary. That would mean that users using GSL might also need to use BYTE_TYPE instead of gsl::byte, which in my opinion is a change for the worse.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
standard.