mirror of
https://github.com/boostorg/range.git
synced 2025-07-31 13:27:31 +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/range/detail/any_iterator_buffer.hpp>
|
||||||
#include <boost/iterator/iterator_categories.hpp>
|
#include <boost/iterator/iterator_categories.hpp>
|
||||||
#include <boost/mpl/not.hpp>
|
#include <boost/mpl/not.hpp>
|
||||||
#include <boost/type_traits/add_const.hpp>
|
#include <boost/type_traits/decay.hpp>
|
||||||
#include <boost/type_traits/add_reference.hpp>
|
#include <boost/type_traits/is_convertible.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/is_reference.hpp>
|
||||||
#include <boost/type_traits/remove_const.hpp>
|
|
||||||
#include <boost/type_traits/remove_reference.hpp>
|
#include <boost/type_traits/remove_reference.hpp>
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
@ -40,16 +37,11 @@ namespace boost
|
|||||||
template<class T>
|
template<class T>
|
||||||
struct reference_as_value_type_generator
|
struct reference_as_value_type_generator
|
||||||
{
|
{
|
||||||
typedef typename remove_const<
|
typedef typename decay<T>::type decayed_type;
|
||||||
typename remove_reference<T>::type
|
|
||||||
>::type const_reference_stripped_type;
|
|
||||||
|
|
||||||
typedef typename mpl::if_<
|
typedef typename mpl::if_<
|
||||||
typename mpl::or_<
|
typename is_convertible<const decayed_type&, decayed_type>::type,
|
||||||
mpl::not_<typename is_abstract<const_reference_stripped_type>::type>,
|
decayed_type,
|
||||||
typename is_copy_constructible<const_reference_stripped_type>::type
|
|
||||||
>::type,
|
|
||||||
const_reference_stripped_type,
|
|
||||||
T
|
T
|
||||||
>::type type;
|
>::type type;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user