From 24c3beb79135f91691e2b1cbe2fc56101c26332a Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Tue, 26 Sep 2000 22:09:34 +0000 Subject: [PATCH] rolled back the removal of the iterator_adaptor alternate code, added the graph test file [SVN r7851] --- include/boost/pending/integer_range.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/boost/pending/integer_range.hpp b/include/boost/pending/integer_range.hpp index 7bd35a0..35b735e 100644 --- a/include/boost/pending/integer_range.hpp +++ b/include/boost/pending/integer_range.hpp @@ -13,13 +13,22 @@ #ifndef BOOST_INTEGER_RANGE_HPP_ #define BOOST_INTEGER_RANGE_HPP_ +#if !defined(BOOST_MSVC) || defined(__SGI_STL_PORT) +#define BOOST_USE_ITERATOR_ADAPTORS +#endif + +#ifdef BOOST_USE_ITERATOR_ADAPTORS #include +#else +#include +#endif namespace boost { //============================================================================= // Counting Iterator and Integer Range Class +#ifdef BOOST_USE_ITERATOR_ADAPTORS struct counting_iterator_policies : public default_iterator_policies { template @@ -34,11 +43,16 @@ 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_USE_ITERATOR_ADAPTORS typedef iterator_adaptor, IntegerType> iterator; +#else + typedef int_iterator iterator; +#endif typedef iterator const_iterator; typedef IntegerType value_type; @@ -66,4 +80,8 @@ protected: } // namespace boost +#ifdef BOOST_USE_ITERATOR_ADAPTORS +#undef BOOST_USE_ITERATOR_ADAPTORS +#endif + #endif // BOOST_INTEGER_RANGE_HPP_