diff --git a/include/boost/python/class.hpp b/include/boost/python/class.hpp index cff0adf9..166ced73 100644 --- a/include/boost/python/class.hpp +++ b/include/boost/python/class.hpp @@ -245,9 +245,12 @@ namespace detail template struct select_held_type : mpl::select_type< - !(specifies_bases::value | is_same::value) - , T - , Prev + type_traits::ice_or< + type_traits::ice_not::value>::value + , is_same::value + >::value + , T + , Prev > { }; diff --git a/include/boost/python/object/select_holder.hpp b/include/boost/python/object/select_holder.hpp index 39d50c0a..72446358 100644 --- a/include/boost/python/object/select_holder.hpp +++ b/include/boost/python/object/select_holder.hpp @@ -22,8 +22,10 @@ namespace detail template struct select_value_holder { + BOOST_STATIC_CONSTANT(bool, selector = (!is_same::value) | has_back_reference::value); + typedef typename mpl::select_type< - (!is_same::value) | has_back_reference::value + selector , value_holder_back_reference , value_holder >::type holder; @@ -35,9 +37,10 @@ namespace detail struct select_pointer_holder { typedef typename python::detail::pointee::type pointee; + BOOST_STATIC_CONSTANT(bool, selector = (!is_same::value) | has_back_reference::value); typedef typename mpl::select_type< - (!is_same::value) | has_back_reference::value + selector , pointer_holder_back_reference , pointer_holder >::type holder;