[protobuf] Protobuf no longer compiles with vs2019 Update 16.10 w/ c++latest #18251
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.
Describe the pull request
What does your PR fix?
Temporary Workaround for protocolbuffers/protobuf#8688
The fix is needed to unblock compiling OpenTelemetry C++ SDK with vs2019-update16.10 . Note that the previous compiler was fine because 16.9 did not have support for
constinit
. I am not sure if it's a bug in Visual Studio 2019 support ofconstinit
. Thus, the safest is to avoid using the feature in protobuf.Which triplets are supported/not supported? Have you updated the [CI baseline]
All previous triplets supported. No changes intended. Verified that local build on Windows msvc2019-16.10 with C++20 passes all tests.
Does your PR follow the [maintainer guide]
Yes.
If you have added/updated a port: Have you run
./vcpkg x-add-version --all
and committed the result?Yes.
If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/
Opening it as a draft because it is my first PR in this repository.