1818# include < boost/python/init.hpp>
1919# include < boost/python/args_fwd.hpp>
2020
21- # include < boost/type_traits/ice.hpp>
2221# include < boost/type_traits/is_same.hpp>
2322# include < boost/type_traits/is_convertible.hpp>
2423# include < boost/type_traits/is_member_function_pointer.hpp>
2827# include < boost/mpl/for_each.hpp>
2928# include < boost/mpl/bool_c.hpp>
3029# include < boost/mpl/logical/not.hpp>
30+ # include < boost/mpl/logical/or.hpp>
3131
3232# include < boost/python/object/select_holder.hpp>
3333# include < boost/python/object/class_wrapper.hpp>
4444# include < boost/python/detail/force_instantiate.hpp>
4545
4646# include < boost/utility.hpp>
47+ # include < boost/detail/workaround.hpp>
4748
4849namespace boost { namespace python {
4950
@@ -474,7 +475,13 @@ inline void class_<T,X1,X2,X3>::register_() const
474475
475476 detail::register_class_to_python<T>(
476477 mpl::bool_c<is_copyable>()
478+ # if BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
477479 , holder_selector::execute ((held_type*)0 )
480+ # elif BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
481+ , holder_selector::type ()
482+ # else
483+ , typename holder_selector::type ()
484+ # endif
478485 );
479486}
480487
@@ -484,7 +491,11 @@ inline class_<T,X1,X2,X3>::class_(char const* name, char const* doc)
484491{
485492 this ->register_ ();
486493 this ->set_instance_size (holder_selector::additional_size ());
494+ # if BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
487495 holder_selector::execute ((held_type*)0 ).assert_default_constructible ();
496+ # else
497+ holder_selector::type::assert_default_constructible ();
498+ # endif
488499 this ->def (init<>());
489500}
490501
@@ -508,20 +519,21 @@ namespace detail
508519{
509520 template <class T1 , class T2 , class T3 >
510521 struct has_noncopyable
511- : type_traits::ice_or<
512- is_same<T1 ,noncopyable>::value
513- , is_same<T2 ,noncopyable>::value
514- , is_same<T3 ,noncopyable>::value>
522+ : mpl::logical_or<
523+ is_same<T1 ,noncopyable>
524+ , is_same<T2 ,noncopyable>
525+ , is_same<T3 ,noncopyable>
526+ >
515527 {};
516528
517529
518530 template <class T , class Prev >
519531 struct select_held_type
520- : mpl::if_c <
521- type_traits::ice_or <
522- specifies_bases<T>::value
523- , is_same<T,noncopyable>::value
524- >::value
532+ : mpl::if_ <
533+ mpl::logical_or <
534+ specifies_bases<T>
535+ , is_same<T,noncopyable>
536+ >
525537 , Prev
526538 , T
527539 >
0 commit comments