Skip to content

Commit 0d78076

Browse files
committed
Update struct_smart_holder.h
1 parent 941a56b commit 0d78076

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/pybind11/detail/struct_smart_holder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ High-level aspects:
5959
#include <utility>
6060

6161
// IMPORTANT: This code block must stay BELOW the #include <stdexcept> above.
62+
// This is only requried on some builds with libc++ (one of three implementations
63+
// in https://github.com/llvm/llvm-project/blob/a9b64bb3180dab6d28bf800a641f9a9ad54d2c0c/libcxx/include/typeinfo#L271-L276
64+
// requiere it)
6265
#if !defined(PYBIND11_EXPORT_GUARDED_DELETE)
63-
# if defined(_LIBCPP_EXCEPTION)
64-
# if defined(WIN32) || defined(_WIN32)
65-
# error "UNEXPECTED: defined(_LIBCPP_EXCEPTION) && (defined(WIN32) || defined(_WIN32))"
66-
# endif
66+
# if defined(__libcpp_version) && !defined(WIN32) && !defined(_WIN32)
6767
# define PYBIND11_EXPORT_GUARDED_DELETE __attribute__((visibility("default")))
6868
# else
6969
# define PYBIND11_EXPORT_GUARDED_DELETE

0 commit comments

Comments
 (0)