Exclude MSVC up to 19.16 from using std::launder#5968
Conversation
Versions 19.4, 19.5 and 19.6 now also excluded. Error seen with 19.6, error triggered by this commit: pybind@57b9a0a _deps\fetchedpybind11-src\include\pybind11\pybind11.h(3008): fatal error C1001: An internal error has occurred in the compiler. [C:\projects\openpmd-api\build\openPMD.py.vcxproj] (compiler file 'd:\agent\_work\8\s\src\vctools\compiler\utc\src\p2\main.c', line 187) To work around this problem, try simplifying or changing the program near the locations listed above. Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information
rwgk
left a comment
There was a problem hiding this comment.
I think that should be fine, but could you please add // See PR #5968 to the end of the line? If std::launder causes trouble again, that'll make it much easier for others to discover this PR and to get the full context.
I just had a minute to quickly do this. I'll merge when I see that the CI is done. |
|
Thank you! |
|
Should I additionally submit a PR for the |
No need, thanks. We'll just merge the current |
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?