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