diff --git a/include/boost/pending/integer_range.hpp b/include/boost/pending/integer_range.hpp index 37d4903..f3c54c6 100644 --- a/include/boost/pending/integer_range.hpp +++ b/include/boost/pending/integer_range.hpp @@ -13,10 +13,14 @@ #ifndef BOOST_INTEGER_RANGE_HPP_ #define BOOST_INTEGER_RANGE_HPP_ -#ifdef BOOST_MSVC -#include -#else +#ifndef BOOST_MSVC +#define BOOST_USE_ITERATOR_ADAPTORS +#endif + +#ifdef BOOST_USE_ITERATOR_ADAPTORS #include +#else +#include #endif namespace boost { @@ -24,6 +28,7 @@ namespace boost { //============================================================================= // Counting Iterator and Integer Range Class +#ifdef BOOST_USE_ITERATOR_ADAPTORS struct counting_iterator_policies : public default_iterator_policies { template @@ -38,14 +43,15 @@ struct counting_iterator_traits { typedef std::ptrdiff_t difference_type; typedef std::random_access_iterator_tag iterator_category; }; +#endif template struct integer_range { -#ifdef BOOST_MSVC - typedef int_iterator iterator; -#else +#ifdef BOOST_USE_ITERATOR_ADAPTORS typedef iterator_adaptor, IntegerType> iterator; +#else + typedef int_iterator iterator; #endif typedef iterator const_iterator; typedef IntegerType value_type; @@ -73,4 +79,8 @@ protected: } // namespace boost +#ifndef BOOST_MSVC +#undef BOOST_USE_ITERATOR_ADAPTORS +#endif + #endif // BOOST_INTEGER_RANGE_HPP_