Exclude MSVC up to 19.16 from using std::launder #5968
Merged
+1
−1
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.
Description
This PR fixes/works around an internal compiler error triggered by MSVC 19.16 in our CI when trying to upgrade to pybind11 v3.0.1:
With git-bisect, I found this commit as the first failing commit. More precisely, the compiler crash is caused by this single line:
pybind11/include/pybind11/pybind11.h
Line 364 in 57b9a0a
This PR now raises the minimum MSVC version with support for
std::launderto 19.20, thus excluding also 19.14, 19.15 and 19.16. This locally fixes the error for me.Suggested changelog entry:
Block MSVC up to 19.16 from use of std::launder due to internal compiler errors
Other
This PR is for the master branch, upon which I cannot test its effect since our project does not seem to compile against the current master branch:
_deps/fetchedpybind11-src/include/pybind11/pybind11.h:2462:25: error: static assertion failed: def_property family does not currently support keep_alive. Use a py::cpp_function instead..Should I additionally submit a PR for
v3.0?