forked from boostorg/range
trac 5816 - fix any_range requiring copyable elements.
This commit is contained in:
@ -27,25 +27,40 @@ namespace boost
|
||||
{
|
||||
typedef typename mpl::if_<
|
||||
typename is_reference<T>::type,
|
||||
typename add_reference<
|
||||
typename add_const<
|
||||
typename remove_reference<T>::type
|
||||
>::type
|
||||
>::type,
|
||||
typename add_const<
|
||||
typename remove_reference<T>::type
|
||||
>::type&,
|
||||
T
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct mutable_reference_type_generator
|
||||
{
|
||||
typedef typename mpl::if_<
|
||||
typename mpl::and_<
|
||||
typename is_const<T>::type,
|
||||
typename mpl::not_<typename is_reference<T>::type>::type
|
||||
>::type,
|
||||
T,
|
||||
typename add_reference<T>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
class Reference
|
||||
, class Buffer
|
||||
>
|
||||
struct any_incrementable_iterator_interface
|
||||
{
|
||||
typedef Reference reference;
|
||||
typedef typename mutable_reference_type_generator<
|
||||
Reference
|
||||
>::type reference;
|
||||
|
||||
typedef typename const_reference_type_generator<
|
||||
Reference
|
||||
>::type const_reference;
|
||||
|
||||
typedef typename remove_const<
|
||||
typename remove_reference<Reference>::type
|
||||
>::type reference_as_value_type;
|
||||
@ -87,7 +102,7 @@ namespace boost
|
||||
virtual any_single_pass_iterator_interface<reference_as_value_type, Buffer>*
|
||||
clone_reference_as_value(buffer_type& buffer) const = 0;
|
||||
|
||||
virtual Reference dereference() const = 0;
|
||||
virtual reference dereference() const = 0;
|
||||
|
||||
virtual bool equal(const any_single_pass_iterator_interface& other) const = 0;
|
||||
};
|
||||
|
Reference in New Issue
Block a user