Add is_copy_constructible for >= C++11

This commit is contained in:
code@jendruk.com
2019-05-08 09:58:37 +02:00
parent 911d8a427d
commit 9f03cc44d8

View File

@ -12,9 +12,11 @@
#include <boost/range/detail/any_iterator_buffer.hpp>
#include <boost/iterator/iterator_categories.hpp>
#include <boost/mpl/not.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/is_abstract.hpp>
#include <boost/type_traits/is_copy_constructible.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
@ -38,16 +40,17 @@ namespace boost
template<class T>
struct reference_as_value_type_generator
{
typedef typename remove_const<
typename remove_reference<T>::type
>::type const_reference_stripped_type;
typedef typename mpl::if_<
typename is_abstract<
typename remove_const<
typename remove_reference<T>::type
>::type
typename mpl::or_<
mpl::not_<typename is_abstract<const_reference_stripped_type>::type>,
typename is_copy_constructible<const_reference_stripped_type>::type
>::type,
T,
typename remove_const<
typename remove_reference<T>::type
>::type
const_reference_stripped_type,
T
>::type type;
};