From e5dc3c7b32eb82595723883c279cf21c1e88aeaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Tue, 20 Jan 2026 15:50:06 +0100 Subject: [PATCH 1/2] Exclude further MSVC versions from std::launder Versions 19.4, 19.5 and 19.6 now also excluded. Error seen with 19.6, error triggered by this commit: https://github.com/pybind/pybind11/commit/57b9a0af815d19b236b74be06a172bc5c9956618 _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 --- include/pybind11/detail/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index 4406adf5b6..a32ecfcb68 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -87,7 +87,7 @@ # endif #endif -#if defined(__cpp_lib_launder) && !(defined(_MSC_VER) && (_MSC_VER < 1914)) +#if defined(__cpp_lib_launder) && !(defined(_MSC_VER) && (_MSC_VER < 1920)) # define PYBIND11_STD_LAUNDER std::launder # define PYBIND11_HAS_STD_LAUNDER 1 #else From 1f6b0ae7d4e53f8e36dc987abd122a80f969e99b Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 20 Jan 2026 20:53:26 -0800 Subject: [PATCH 2/2] Add minimal comment // See PR #5968 --- include/pybind11/detail/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index a32ecfcb68..19ebc8532e 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -87,7 +87,7 @@ # endif #endif -#if defined(__cpp_lib_launder) && !(defined(_MSC_VER) && (_MSC_VER < 1920)) +#if defined(__cpp_lib_launder) && !(defined(_MSC_VER) && (_MSC_VER < 1920)) // See PR #5968 # define PYBIND11_STD_LAUNDER std::launder # define PYBIND11_HAS_STD_LAUNDER 1 #else