mirror of
https://github.com/boostorg/range.git
synced 2025-07-29 20:37:25 +02:00
Replace is_copy_constructible and is_abstract with is_convertible
This commit is contained in:
@ -13,12 +13,9 @@
|
||||
#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/decay.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
namespace boost
|
||||
@ -40,16 +37,11 @@ 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 decay<T>::type decayed_type;
|
||||
|
||||
typedef typename mpl::if_<
|
||||
typename mpl::or_<
|
||||
mpl::not_<typename is_abstract<const_reference_stripped_type>::type>,
|
||||
typename is_copy_constructible<const_reference_stripped_type>::type
|
||||
>::type,
|
||||
const_reference_stripped_type,
|
||||
typename is_convertible<const decayed_type&, decayed_type>::type,
|
||||
decayed_type,
|
||||
T
|
||||
>::type type;
|
||||
};
|
||||
|
Reference in New Issue
Block a user