From 9f03cc44d8f7d228d4fe4dcdcedc0435c6413e98 Mon Sep 17 00:00:00 2001 From: "code@jendruk.com" Date: Wed, 8 May 2019 09:58:37 +0200 Subject: [PATCH] Add is_copy_constructible for >= C++11 --- .../range/detail/any_iterator_interface.hpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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; };