diff --git a/include/boost/python/converter/from_python_data.hpp b/include/boost/python/converter/from_python_data.hpp index fe026172..9b418957 100644 --- a/include/boost/python/converter/from_python_data.hpp +++ b/include/boost/python/converter/from_python_data.hpp @@ -15,7 +15,7 @@ # include # include # include -//# include +# include # include # include # include @@ -129,19 +129,23 @@ namespace detail BOOST_STATIC_CONSTANT(std::size_t, target = referent_alignment::value); typedef lower_alignment t1; + + BOOST_STATIC_CONSTANT(bool, t1_aligned = + (alignment_of::value >= target) + & (alignment_of::value % target == 0)); + typedef lower_size::value> t2; + BOOST_STATIC_CONSTANT(bool, t2_aligned = + (alignment_of::value >= target) + & (alignment_of::value % target == 0)); + + typedef typename mpl::select_type< - ::boost::detail::ice_and< - alignment_of::value >= target - , alignment_of::value % target == 0 - >::value + t1_aligned , t1 , typename mpl::select_type< - ::boost::detail::ice_and< - alignment_of::value >= target - , alignment_of::value % target == 0 - >::value + t2_aligned , t2 , max_align >::type