@@ -77,21 +77,21 @@ namespace detail
7777 template <detail::operator_id, class L , class R >
7878 struct operator_ ;
7979
80- // Register a to_python converter for a class T, depending on the
81- // type of the first (tag) argument. The 2nd argument is a pointer
82- // to the type of holder that must be created. The 3rd argument is a
80+ // Register to_python converters for a class T. The first argument
81+ // will be mpl::true_c unless noncopyable was specified as a
82+ // class_<...> template parameter. The 2nd argument is a pointer to
83+ // the type of holder that must be created. The 3rd argument is a
8384 // reference to the Python type object to be created.
8485 template <class T , class SelectHolder >
85- static inline void register_copy_constructor (mpl::bool_c< true > const & , SelectHolder const & , T* = 0 )
86+ inline void register_class_to_python (mpl::true_c copyable , SelectHolder selector , T* = 0 )
8687 {
8788 typedef typename SelectHolder::type holder;
8889 force_instantiate (objects::class_cref_wrapper<T, objects::make_instance<T,holder> >());
8990 SelectHolder::register_ ();
9091 }
9192
92- // Tag dispatched to have no effect.
9393 template <class T , class SelectHolder >
94- static inline void register_copy_constructor (mpl::bool_c< false > const & , SelectHolder const & , T* = 0 )
94+ inline void register_class_to_python (mpl::false_c copyable , SelectHolder selector , T* = 0 )
9595 {
9696 SelectHolder::register_ ();
9797 }
@@ -125,20 +125,14 @@ namespace detail
125125
126126 template <class T , class Fn >
127127 struct virtual_function_default
128- # if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
129- : assertion<is_polymorphic<T> >::failed
130- , assertion<is_member_function_pointer<Fn> >::failed
131- # endif
132128 {
133129 template <class Default >
134130 static void
135131 must_be_derived_class_member (Default const &)
136132 {
137133 typedef typename assertion<mpl::logical_not<is_same<Default,Fn> > >::failed test0;
138- # if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
139134 typedef typename assertion<is_polymorphic<T> >::failed test1;
140135 typedef typename assertion<is_member_function_pointer<Fn> >::failed test2;
141- # endif
142136 not_a_derived_class_member<Default>(Fn ());
143137 }
144138 };
@@ -473,7 +467,7 @@ inline void class_<T,X1,X2,X3>::register_() const
473467{
474468 objects::register_class_from_python<T,bases>();
475469
476- detail::register_copy_constructor <T>(
470+ detail::register_class_to_python <T>(
477471 mpl::bool_c<is_copyable>()
478472 , holder_selector::execute ((held_type*)0 )
479473 );
0 commit comments