mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-31 23:30:30 +00:00
Set PYBIND11_TYPE_CASTER_ODR_GUARD_ON automatically.
This commit is contained in:
parent
e515940252
commit
15db5e5fea
@ -904,7 +904,12 @@ struct polymorphic_type_hook : public polymorphic_type_hook_base<itype> {};
|
||||
|
||||
PYBIND11_NAMESPACE_BEGIN(detail)
|
||||
|
||||
#define PYBIND11_TYPE_CASTER_ODR_GUARD_ON
|
||||
#if !defined(PYBIND11_TYPE_CASTER_ODR_GUARD_ON) && !defined(PYBIND11_TYPE_CASTER_ODR_GUARD_OFF) \
|
||||
&& (defined(_MSC_VER) || defined(PYBIND11_CPP20) \
|
||||
|| (defined(PYBIND11_CPP17) && defined(__clang__)))
|
||||
# define PYBIND11_TYPE_CASTER_ODR_GUARD_ON
|
||||
#endif
|
||||
|
||||
#ifdef PYBIND11_TYPE_CASTER_ODR_GUARD_ON
|
||||
|
||||
namespace {
|
||||
|
Loading…
Reference in New Issue
Block a user