File tree 1 file changed +6
-5
lines changed 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,12 @@ PYBIND11_NAMESPACE_BEGIN(detail)
42
42
// (line numbers vary between translation units).
43
43
#if defined(PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD_IF_AVAILABLE) \
44
44
&& !defined(PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD) && defined(PYBIND11_CPP17) \
45
- && !defined(__INTEL_COMPILER) \
46
- && ((defined(_MSC_VER) && _MSC_VER >= 1920 ) \
47
- || (defined(__has_builtin) && __has_builtin(__builtin_FILE) \
48
- && __has_builtin(__builtin_LINE)))
49
- # define PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD
45
+ && !defined(__INTEL_COMPILER) && (!defined(_MSC_VER) || _MSC_VER >= 1920 ) \
46
+ && defined(__has_builtin)
47
+ // This needs to be a nested #if to not upset older compilers.
48
+ # if __has_builtin(__builtin_FILE) && __has_builtin(__builtin_LINE)
49
+ # define PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD
50
+ # endif
50
51
#endif
51
52
52
53
#ifdef PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD
You can’t perform that action at this time.
0 commit comments