Ignore PYBIND11_USE_SMART_HOLDER_AS_DEFAULT if PYBIND11_HAVE_INTERNALS_WITH_SMART_HOLDER_SUPPORT is not defined.

This commit is contained in:
Ralf W. Grosse-Kunstleve 2024-07-19 10:18:05 -07:00
parent 95e9053f7f
commit e4456197c4
2 changed files with 4 additions and 2 deletions

View File

@ -1797,7 +1797,8 @@ struct property_cpp_function<
#endif // PYBIND11_HAVE_INTERNALS_WITH_SMART_HOLDER_SUPPORT
#ifdef PYBIND11_USE_SMART_HOLDER_AS_DEFAULT
#if defined(PYBIND11_USE_SMART_HOLDER_AS_DEFAULT) \
&& defined(PYBIND11_HAVE_INTERNALS_WITH_SMART_HOLDER_SUPPORT)
// BAKEIN_WIP: Add comment to explain: This is meant for stress-testing only.
template <typename>
using default_holder_type = smart_holder;

View File

@ -613,7 +613,8 @@ CHECK_NOALIAS(8);
CHECK_HOLDER(1, unique);
CHECK_HOLDER(2, unique);
CHECK_HOLDER(3, unique);
#ifdef PYBIND11_USE_SMART_HOLDER_AS_DEFAULT
#if defined(PYBIND11_USE_SMART_HOLDER_AS_DEFAULT) \
&& defined(PYBIND11_HAVE_INTERNALS_WITH_SMART_HOLDER_SUPPORT)
CHECK_SMART_HOLDER(4);
CHECK_SMART_HOLDER(5);
#else