summaryrefslogtreecommitdiff
path: root/boost/range/iterator_range_core.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/range/iterator_range_core.hpp')
-rw-r--r--boost/range/iterator_range_core.hpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/boost/range/iterator_range_core.hpp b/boost/range/iterator_range_core.hpp
index 8108947724..2fbeb686e2 100644
--- a/boost/range/iterator_range_core.hpp
+++ b/boost/range/iterator_range_core.hpp
@@ -442,8 +442,8 @@ public:
> base_type;
template<class Source>
- struct is_compatible_range
- : is_convertible<
+ struct is_compatible_range_
+ : is_convertible<
BOOST_DEDUCED_TYPENAME mpl::eval_if<
has_range_iterator<Source>,
range_iterator<Source>,
@@ -454,6 +454,20 @@ public:
{
};
+ template<class Source>
+ struct is_compatible_range
+ : mpl::and_<
+ mpl::not_<
+ is_convertible<
+ Source,
+ BOOST_DEDUCED_TYPENAME base_type::iterator
+ >
+ >,
+ is_compatible_range_<Source>
+ >
+ {
+ };
+
protected:
typedef iterator_range_detail::iterator_range_impl<IteratorT> impl;