mirror of
https://github.com/boostorg/iterator.git
synced 2025-05-11 21:43:54 +00:00
changes for visual c++ port
[SVN r7764]
This commit is contained in:
parent
40b7a3e8aa
commit
76efd2456c
@ -13,10 +13,14 @@
|
|||||||
#ifndef BOOST_INTEGER_RANGE_HPP_
|
#ifndef BOOST_INTEGER_RANGE_HPP_
|
||||||
#define BOOST_INTEGER_RANGE_HPP_
|
#define BOOST_INTEGER_RANGE_HPP_
|
||||||
|
|
||||||
#ifdef BOOST_MSVC
|
#ifndef BOOST_MSVC
|
||||||
#include <boost/pending/detail/int_iterator.hpp>
|
#define BOOST_USE_ITERATOR_ADAPTORS
|
||||||
#else
|
#endif
|
||||||
|
|
||||||
|
#ifdef BOOST_USE_ITERATOR_ADAPTORS
|
||||||
#include <boost/pending/iterator_adaptors.hpp>
|
#include <boost/pending/iterator_adaptors.hpp>
|
||||||
|
#else
|
||||||
|
#include <boost/pending/detail/int_iterator.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@ -24,6 +28,7 @@ namespace boost {
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
// Counting Iterator and Integer Range Class
|
// Counting Iterator and Integer Range Class
|
||||||
|
|
||||||
|
#ifdef BOOST_USE_ITERATOR_ADAPTORS
|
||||||
struct counting_iterator_policies : public default_iterator_policies
|
struct counting_iterator_policies : public default_iterator_policies
|
||||||
{
|
{
|
||||||
template <class IntegerType>
|
template <class IntegerType>
|
||||||
@ -38,14 +43,15 @@ struct counting_iterator_traits {
|
|||||||
typedef std::ptrdiff_t difference_type;
|
typedef std::ptrdiff_t difference_type;
|
||||||
typedef std::random_access_iterator_tag iterator_category;
|
typedef std::random_access_iterator_tag iterator_category;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
template <class IntegerType>
|
template <class IntegerType>
|
||||||
struct integer_range {
|
struct integer_range {
|
||||||
#ifdef BOOST_MSVC
|
#ifdef BOOST_USE_ITERATOR_ADAPTORS
|
||||||
typedef int_iterator<IntegerType> iterator;
|
|
||||||
#else
|
|
||||||
typedef iterator_adaptor<IntegerType, counting_iterator_policies,
|
typedef iterator_adaptor<IntegerType, counting_iterator_policies,
|
||||||
counting_iterator_traits<IntegerType>, IntegerType> iterator;
|
counting_iterator_traits<IntegerType>, IntegerType> iterator;
|
||||||
|
#else
|
||||||
|
typedef int_iterator<IntegerType> iterator;
|
||||||
#endif
|
#endif
|
||||||
typedef iterator const_iterator;
|
typedef iterator const_iterator;
|
||||||
typedef IntegerType value_type;
|
typedef IntegerType value_type;
|
||||||
@ -73,4 +79,8 @@ protected:
|
|||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
|
#ifndef BOOST_MSVC
|
||||||
|
#undef BOOST_USE_ITERATOR_ADAPTORS
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // BOOST_INTEGER_RANGE_HPP_
|
#endif // BOOST_INTEGER_RANGE_HPP_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user