Index: trunk/boost/lambda/detail/function_adaptors.hpp =================================================================== --- a/trunk/boost/lambda/detail/function_adaptors.hpp +++ b/trunk/boost/lambda/detail/function_adaptors.hpp @@ -17,4 +17,7 @@ #include "boost/type_traits/same_traits.hpp" #include "boost/type_traits/remove_reference.hpp" +#include "boost/type_traits/remove_cv.hpp" +#include "boost/type_traits/add_const.hpp" +#include "boost/type_traits/add_volatile.hpp" #include "boost/utility/result_of.hpp" @@ -238,12 +241,14 @@ template class sig { typedef typename boost::tuples::element<1, Args>::type argument_type; - - typedef typename detail::IF::value, + typedef typename boost::remove_reference< + argument_type + >::type unref_type; + + typedef typename detail::IF::value, typename boost::add_const::type, T >::RET properly_consted_return_type; - typedef typename detail::IF< - boost::is_volatile::value, + typedef typename detail::IF::value, typename boost::add_volatile::type, properly_consted_return_type @@ -252,6 +257,8 @@ public: - typedef typename - boost::add_reference::type type; + typedef typename detail::IF::value, + typename boost::add_reference::type, + typename boost::remove_cv::type + >::RET type; };