Skip to content

Commit 883cadf

Browse files
committed
Try _LIBCPP_VERSION
1 parent 8f0c28e commit 883cadf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/pybind11/detail/internals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ inline void tls_replace_value(PYBIND11_TLS_KEY_REF key, void *value) {
114114
// libstdc++, this doesn't happen: equality and the type_index hash are based on the type name,
115115
// which works. If not under a known-good stl, provide our own name-based hash and equality
116116
// functions that use the type name.
117-
#if defined(__GLIBCXX__) || defined(WIN32) || defined(_WIN32)
117+
#if !defined(_LIBCPP_VERSION)
118118
inline bool same_type(const std::type_info &lhs, const std::type_info &rhs) { return lhs == rhs; }
119119
using type_hash = std::hash<std::type_index>;
120120
using type_equal_to = std::equal_to<std::type_index>;

0 commit comments

Comments
 (0)