mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-16 06:02:33 +02:00
Workaround MSVC 14.1 problem with template specialization partial ordering that caused compilation failure when next/prior is used with pointers. Added a test.
This commit is contained in:
@ -46,13 +46,13 @@ namespace next_prior_detail {
|
||||
// Since C++17 we can test for iterator_traits<T>::iterator_category presence instead as it is
|
||||
// required to be only present for iterators.
|
||||
template< typename T, typename Void = void >
|
||||
struct is_iterator
|
||||
struct is_iterator_class
|
||||
{
|
||||
static BOOST_CONSTEXPR_OR_CONST bool value = false;
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
struct is_iterator<
|
||||
struct is_iterator_class<
|
||||
T,
|
||||
typename enable_if_has_type<
|
||||
#if !defined(BOOST_NO_CXX17_ITERATOR_TRAITS)
|
||||
@ -67,7 +67,13 @@ struct is_iterator<
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
struct is_iterator< T*, void >
|
||||
struct is_iterator :
|
||||
public is_iterator_class< T >
|
||||
{
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
struct is_iterator< T* >
|
||||
{
|
||||
static BOOST_CONSTEXPR_OR_CONST bool value = true;
|
||||
};
|
||||
|
Reference in New Issue
Block a user