diff --git a/include/boost/next_prior.hpp b/include/boost/next_prior.hpp index bad46ed..178cf67 100644 --- a/include/boost/next_prior.hpp +++ b/include/boost/next_prior.hpp @@ -52,7 +52,16 @@ struct is_iterator }; template< typename T > -struct is_iterator< T, typename enable_if_has_type< typename T::iterator_category >::type > +struct is_iterator< + T, + typename enable_if_has_type< +#if !defined(BOOST_NO_CXX17_ITERATOR_TRAITS) + typename std::iterator_traits< T >::iterator_category +#else + typename T::iterator_category +#endif + >::type +> { static BOOST_CONSTEXPR_OR_CONST bool value = true; };