diff --git a/include/boost/range/detail/any_iterator_interface.hpp b/include/boost/range/detail/any_iterator_interface.hpp index 6c218e8..6135474 100644 --- a/include/boost/range/detail/any_iterator_interface.hpp +++ b/include/boost/range/detail/any_iterator_interface.hpp @@ -13,12 +13,9 @@ #include #include #include -#include -#include -#include -#include +#include +#include #include -#include #include namespace boost @@ -40,16 +37,11 @@ namespace boost template struct reference_as_value_type_generator { - typedef typename remove_const< - typename remove_reference::type - >::type const_reference_stripped_type; + typedef typename decay::type decayed_type; typedef typename mpl::if_< - typename mpl::or_< - mpl::not_::type>, - typename is_copy_constructible::type - >::type, - const_reference_stripped_type, + typename is_convertible::type, + decayed_type, T >::type type; };