blob: a61f769c9f0a25ba81e0d2905ec71e921d5224a9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
--- a/include/pybind11/detail/internals.h (index)
+++ b/include/pybind11/detail/internals.h (working tree)
@@ -132,7 +132,8 @@ inline void tls_replace_value(PYBIND11_TLS_KEY_REF key, void *value) {
// which works. If not under a known-good stl, provide our own name-based hash and equality
// functions that use the type name.
#if (PYBIND11_INTERNALS_VERSION <= 4 && defined(__GLIBCXX__)) \
- || (PYBIND11_INTERNALS_VERSION >= 5 && !defined(_LIBCPP_VERSION))
+ || (PYBIND11_INTERNALS_VERSION >= 5 && !defined(_LIBCPP_VERSION)) \
+ || defined(PYBIND11_TYPEINFO_NATIVE_HASH)
inline bool same_type(const std::type_info &lhs, const std::type_info &rhs) { return lhs == rhs; }
using type_hash = std::hash<std::type_index>;
using type_equal_to = std::equal_to<std::type_index>;
|