diff --git a/include/boost/parameter/aux_/unwrap_cv_reference.hpp b/include/boost/parameter/aux_/unwrap_cv_reference.hpp index 8841124..8a8bc58 100755 --- a/include/boost/parameter/aux_/unwrap_cv_reference.hpp +++ b/include/boost/parameter/aux_/unwrap_cv_reference.hpp @@ -40,6 +40,14 @@ struct is_cv_reference_wrapper typedef mpl::bool_ type; }; +// Needed for unwrap_cv_reference below. T might be const, so +// eval_if might fail because of deriving from T const on EDG. +template +struct get_type +{ + typedef typename T::type type; +}; + // Produces the unwrapped type to hold a reference to in named<> // Can't use boost::unwrap_reference<> here because it // doesn't handle the case where T = reference_wrapper cv @@ -48,7 +56,7 @@ struct unwrap_cv_reference { typedef typename mpl::eval_if< is_cv_reference_wrapper - , T + , get_type , mpl::identity >::type type; };