// Copyright David Abrahams 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #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::python::detail::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; }