diff --git a/include/boost/python/object/class_metadata.hpp b/include/boost/python/object/class_metadata.hpp index c29787fb..212abfe4 100755 --- a/include/boost/python/object/class_metadata.hpp +++ b/include/boost/python/object/class_metadata.hpp @@ -30,6 +30,10 @@ # include # include # include + +# include +# include + # include # include @@ -49,6 +53,8 @@ struct register_base_of template inline void operator()(Base*) const { + BOOST_MPL_ASSERT_NOT((is_same)); + // Register the Base class register_dynamic_id(); @@ -58,7 +64,7 @@ struct register_base_of // Register the down-cast, if appropriate. this->register_downcast((Base*)0, is_polymorphic()); } - + private: static inline void register_downcast(void*, mpl::false_) {} @@ -186,7 +192,7 @@ struct class_metadata , mpl::if_< use_value_holder , value_holder - , pointer_holder + , pointer_holder > >::type holder; @@ -253,6 +259,8 @@ struct class_metadata // inline static void maybe_register_callback_class(void*, mpl::false_) {} + inline static void maybe_register_callback_class(wrapped*, mpl::true_) {} + template inline static void maybe_register_callback_class(T2*, mpl::true_) { diff --git a/test/Jamfile b/test/Jamfile index 98e6ca89..a3cb8f93 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -101,6 +101,10 @@ bpl-test crossmod_exception [ bpl-test andreas_beyer ] [ bpl-test polymorphism ] [ bpl-test polymorphism2 ] + +[ bpl-test wrapper_held_type ] +[ bpl-test polymorphism2_auto_ptr ] + [ bpl-test auto_ptr ] [ bpl-test minimal ] [ bpl-test args ] @@ -115,7 +119,7 @@ bpl-test crossmod_exception [ bpl-test keywords : keywords.cpp keywords_test.py ] [ extension builtin_converters : test_builtin_converters.cpp