Skip to content

Commit 0c27340

Browse files
committed
Remove defined(__has_builtin) and subconditions.
1 parent 95ff3d2 commit 0c27340

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

include/pybind11/detail/descr.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,8 @@ PYBIND11_NAMESPACE_BEGIN(detail)
4242
// (line numbers vary between translation units).
4343
#if defined(PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD_IF_AVAILABLE) \
4444
&& !defined(PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD) && defined(PYBIND11_CPP17) \
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
45+
&& !defined(__INTEL_COMPILER) && (!defined(_MSC_VER) || _MSC_VER >= 1920)
46+
# define PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD
5147
#endif
5248

5349
#ifdef PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD

0 commit comments

Comments
 (0)