Fix a C++20 compatibility issue with an unnamed struct (P1766R1)#47
Closed
ClaudioHoffmann wants to merge 1 commit intoMeVisLab:masterfrom
Closed
Fix a C++20 compatibility issue with an unnamed struct (P1766R1)#47ClaudioHoffmann wants to merge 1 commit intoMeVisLab:masterfrom
ClaudioHoffmann wants to merge 1 commit intoMeVisLab:masterfrom
Conversation
As a result of P1766R1 [1], `PyHeapTypeObject` can no longer be added to an unnamed `typedef struct`. On Visual Studio 2019 ≥16.6, this causes the warning C5208 in C++14 and C++17 mode, and the error C7626 with `/std:c++latest` or the future `/std:c++20`. Giving a name to the unnamed struct is the simplest fix here [2]. [1]: http://wg21.link/p1766r1 [2]: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5208
Contributor
|
Thank you for your patch. We decided to drop the typedef altogether, so your patch is obsolete now. |
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.
As a result of P1766R1,
PyHeapTypeObjectcan no longer be added to an unnamedtypedef struct. On Visual Studio 2019 ≥16.6, this causes the warning C5208 in C++14 and C++17 mode, and the error C7626 with/std:c++latestor the future/std:c++20. Giving a name to the unnamed struct is the simplest fix here; see https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5208.