// Copyright David Abrahams 2002. Permission to copy, use, // modify, sell and distribute this software is granted provided this // copyright notice appears in all copies. This software is provided // "as is" without express or implied warranty, and with no claim as // to its suitability for any purpose. #include #include #include #include #include #include #include #include struct BR {}; struct Base {}; struct Derived : Base {}; namespace boost { namespace python { // specialization template <> struct has_back_reference
: mpl::true_ { }; }} // namespace boost::python template void assert_same(U* = 0, T* = 0) { BOOST_STATIC_ASSERT((boost::is_same::value)); } template void assert_holder(T* = 0, Held* = 0, Holder* = 0) { using namespace boost::python::detail; using namespace boost::python::objects; typedef typename class_metadata< T,Held,not_specified,not_specified >::holder h; assert_same( (h*)0 ); } int test_main(int, char * []) { using namespace boost::python::detail; using namespace boost::python::objects; assert_holder >(); assert_holder >(); assert_holder >(); assert_holder >(); assert_holder >(); assert_holder ,pointer_holder,Base> >(); assert_holder ,pointer_holder_back_reference,Base> >(); assert_holder ,pointer_holder_back_reference,BR> > (); return 0; }