forked from boostorg/iterator
Fix counting_iterator::distance_to fails to instantiate for non default template arguments.
[SVN r31758]
This commit is contained in:
@ -172,7 +172,7 @@ class counting_iterator
|
|||||||
# if 0
|
# if 0
|
||||||
template<class OtherIncrementable>
|
template<class OtherIncrementable>
|
||||||
counting_iterator(
|
counting_iterator(
|
||||||
counting_iterator<OtherIncrementable> const& t
|
counting_iterator<OtherIncrementable, CategoryOrTraversal, Difference> const& t
|
||||||
, typename enable_if_convertible<OtherIncrementable, Incrementable>::type* = 0
|
, typename enable_if_convertible<OtherIncrementable, Incrementable>::type* = 0
|
||||||
)
|
)
|
||||||
: super_t(t.base())
|
: super_t(t.base())
|
||||||
@ -188,7 +188,7 @@ class counting_iterator
|
|||||||
|
|
||||||
template <class OtherIncrementable>
|
template <class OtherIncrementable>
|
||||||
difference_type
|
difference_type
|
||||||
distance_to(counting_iterator<OtherIncrementable> const& y) const
|
distance_to(counting_iterator<OtherIncrementable, CategoryOrTraversal, Difference> const& y) const
|
||||||
{
|
{
|
||||||
typedef typename mpl::if_<
|
typedef typename mpl::if_<
|
||||||
detail::is_numeric<Incrementable>
|
detail::is_numeric<Incrementable>
|
||||||
|
@ -277,6 +277,7 @@ int main()
|
|||||||
// Test user-defined type.
|
// Test user-defined type.
|
||||||
|
|
||||||
test_integer3<my_int1, std::forward_iterator_tag, int>();
|
test_integer3<my_int1, std::forward_iterator_tag, int>();
|
||||||
|
test_integer3<long, std::random_access_iterator_tag, int>();
|
||||||
test_integer<my_int2>();
|
test_integer<my_int2>();
|
||||||
test_integer<my_int3>();
|
test_integer<my_int3>();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user