diff --git a/include/pybind11/detail/classh_type_casters.h b/include/pybind11/detail/classh_type_casters.h index d00543e5d..3c5033e53 100644 --- a/include/pybind11/detail/classh_type_casters.h +++ b/include/pybind11/detail/classh_type_casters.h @@ -1,7 +1,9 @@ #pragma once +#include "../cast.h" #include "../pytypes.h" #include "../smart_holder_poc.h" +#include "class.h" #include "common.h" #include "descr.h" #include "internals.h" @@ -224,8 +226,6 @@ struct smart_holder_type_caster_load { using holder_type = pybindit::memory::smart_holder; bool load(handle src, bool convert) { - if (!isinstance(src)) - return false; load_impl = modified_type_caster_generic_load_impl(typeid(T)); if (!load_impl.load(src, convert)) return false;