Skip to content

Commit edfaaed

Browse files
authored
[smart_holder] type_caster_odr_guard MSVC 193732825 C++17 windows-2022 is failing for unknown reasons. (#4918)
* MSVC 193732825 C++17 windows-2022 is failing for unknown reasons. * Bug fix: Need to test `_MSC_FULL_VER` (not `_MSC_VER`).
1 parent fb79bc8 commit edfaaed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/pybind11/detail/descr.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,15 @@ PYBIND11_NAMESPACE_BEGIN(detail)
3939
// violations in binaries that are otherwise already fully tested and assumed to be healthy.
4040
//
4141
// * MSVC 2017 does not support __builtin_FILE(), __builtin_LINE().
42+
// * MSVC 193732825 C++17 windows-2020 is failing for unknown reasons.
4243
// * Intel 2021.6.0.20220226 (g++ 9.4 mode) __builtin_LINE() is unreliable
4344
// (line numbers vary between translation units).
4445
#if defined(PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD_IF_AVAILABLE) \
4546
&& !defined(PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD) && defined(PYBIND11_CPP17) \
4647
&& !defined(__INTEL_COMPILER) \
47-
&& (!defined(_MSC_VER) || _MSC_VER >= 1920) // MSVC 2019 or newer.
48+
&& (!defined(_MSC_VER) \
49+
|| (_MSC_VER >= 1920 /* MSVC 2019 or newer */ \
50+
&& (_MSC_FULL_VER != 193732825 || defined(PYBIND11_CPP20))))
4851
# define PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD
4952
#endif
5053

0 commit comments

Comments
 (0)