#include namespace boost { namespace python { BOOST_PARAMETER_TEMPLATE_KEYWORD(class_type) BOOST_PARAMETER_TEMPLATE_KEYWORD(base_list) BOOST_PARAMETER_TEMPLATE_KEYWORD(held_type) BOOST_PARAMETER_TEMPLATE_KEYWORD(copyable) template struct bases { }; }} #include #include #include #include #include #include #if !defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) || \ !(1 == BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) #include #endif namespace boost { namespace python { typedef boost::parameter::parameters< boost::parameter::required< tag::class_type #if defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) && \ (1 == BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) , boost::mpl::if_< boost::is_class , boost::mpl::true_ , boost::mpl::false_ > #else , boost::mpl::if_< boost::is_scalar , boost::mpl::false_ , boost::mpl::true_ > #endif > , boost::parameter::optional< tag::base_list , boost::mpl::is_sequence > , boost::parameter::optional , boost::parameter::optional > class_signature; }} // namespace boost::python namespace boost { namespace python { template < typename A0 , typename A1 = boost::parameter::void_ , typename A2 = boost::parameter::void_ , typename A3 = boost::parameter::void_ > struct class_ { // Create ArgumentPack typedef typename class_signature::BOOST_NESTED_TEMPLATE bind< A0, A1, A2, A3 >::type args; // Extract first logical parameter. typedef typename boost::parameter::value_type< args, tag::class_type >::type class_type; typedef typename boost::parameter::value_type< args, tag::base_list, boost::python::bases<> >::type base_list; typedef typename boost::parameter::value_type< args, tag::held_type, class_type >::type held_type; typedef typename boost::parameter::value_type< args, tag::copyable, void >::type copyable; }; }} // namespace boost::python struct B { }; struct D { }; #include #include typedef boost::python::class_< boost::python::class_type , boost::python::copyable > c1; typedef boost::python::class_< D , boost::python::held_type< #if defined(BOOST_NO_CXX11_SMART_PTR) std::auto_ptr #else std::unique_ptr #endif > , boost::python::base_list > > c2; #include #include #include MPL_TEST_CASE() { BOOST_MPL_ASSERT(( boost::mpl::if_< boost::is_same , boost::mpl::true_ , boost::mpl::false_ >::type )); BOOST_MPL_ASSERT(( boost::mpl::if_< boost::is_same > , boost::mpl::true_ , boost::mpl::false_ >::type )); BOOST_MPL_ASSERT(( boost::mpl::if_< boost::is_same , boost::mpl::true_ , boost::mpl::false_ >::type )); BOOST_MPL_ASSERT(( boost::mpl::if_< boost::is_same , boost::mpl::true_ , boost::mpl::false_ >::type )); BOOST_MPL_ASSERT(( boost::mpl::if_< boost::is_same , boost::mpl::true_ , boost::mpl::false_ >::type )); BOOST_MPL_ASSERT(( boost::mpl::if_< boost::is_same > , boost::mpl::true_ , boost::mpl::false_ >::type )); #if defined(BOOST_NO_CXX11_SMART_PTR) BOOST_MPL_ASSERT(( boost::mpl::if_< boost::is_same > , boost::mpl::true_ , boost::mpl::false_ >::type )); #else BOOST_MPL_ASSERT(( boost::mpl::if_< boost::is_same > , boost::mpl::true_ , boost::mpl::false_ >::type )); #endif // BOOST_NO_CXX11_SMART_PTR BOOST_MPL_ASSERT(( boost::mpl::if_< boost::is_same , boost::mpl::true_ , boost::mpl::false_ >::type )); }