changes for visual c++ port

[SVN r7764]
This commit is contained in:
Jeremy Siek 2000-09-22 04:18:51 +00:00
parent 40b7a3e8aa
commit 76efd2456c

View File

@ -13,10 +13,14 @@
#ifndef BOOST_INTEGER_RANGE_HPP_
#define BOOST_INTEGER_RANGE_HPP_
#ifdef BOOST_MSVC
#include <boost/pending/detail/int_iterator.hpp>
#else
#ifndef BOOST_MSVC
#define BOOST_USE_ITERATOR_ADAPTORS
#endif
#ifdef BOOST_USE_ITERATOR_ADAPTORS
#include <boost/pending/iterator_adaptors.hpp>
#else
#include <boost/pending/detail/int_iterator.hpp>
#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 <class IntegerType>
@ -38,14 +43,15 @@ struct counting_iterator_traits {
typedef std::ptrdiff_t difference_type;
typedef std::random_access_iterator_tag iterator_category;
};
#endif
template <class IntegerType>
struct integer_range {
#ifdef BOOST_MSVC
typedef int_iterator<IntegerType> iterator;
#else
#ifdef BOOST_USE_ITERATOR_ADAPTORS
typedef iterator_adaptor<IntegerType, counting_iterator_policies,
counting_iterator_traits<IntegerType>, IntegerType> iterator;
#else
typedef int_iterator<IntegerType> 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_