avoid SFINAE problem in iterator_range constructor

This commit is contained in:
Eric Niebler
2014-08-09 14:48:57 -07:00
parent d6bce30c4f
commit 7d13f63d5d
2 changed files with 30 additions and 2 deletions
+16 -2
View File
@@ -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;