From 76efd2456c44d9b7580ef3e19441bd030cd63cd6 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Fri, 22 Sep 2000 04:18:51 +0000 Subject: [PATCH] changes for visual c++ port [SVN r7764] --- include/boost/pending/integer_range.hpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) 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_