diff --git a/include/boost/iterator/filter_iterator.hpp b/include/boost/iterator/filter_iterator.hpp index b87c02b..58aea33 100644 --- a/include/boost/iterator/filter_iterator.hpp +++ b/include/boost/iterator/filter_iterator.hpp @@ -7,6 +7,7 @@ #ifndef BOOST_FILTER_ITERATOR_23022003THW_HPP #define BOOST_FILTER_ITERATOR_23022003THW_HPP +#include #include #include diff --git a/include/boost/iterator/indirect_iterator.hpp b/include/boost/iterator/indirect_iterator.hpp index 7449d62..c16eb84 100644 --- a/include/boost/iterator/indirect_iterator.hpp +++ b/include/boost/iterator/indirect_iterator.hpp @@ -7,10 +7,12 @@ #ifndef BOOST_INDIRECT_ITERATOR_23022003THW_HPP #define BOOST_INDIRECT_ITERATOR_23022003THW_HPP +#include #include #include #include +#include #include @@ -23,8 +25,6 @@ #include #include -#include - #ifdef BOOST_MPL_CFG_NO_HAS_XXX # include # include @@ -45,7 +45,7 @@ namespace iterators { template struct indirect_base { - typedef typename std::iterator_traits::value_type dereferenceable; + typedef typename boost::detail::iterator_traits::value_type dereferenceable; typedef iterator_adaptor< indirect_iterator diff --git a/include/boost/iterator/is_lvalue_iterator.hpp b/include/boost/iterator/is_lvalue_iterator.hpp index 46f0483..e821da9 100644 --- a/include/boost/iterator/is_lvalue_iterator.hpp +++ b/include/boost/iterator/is_lvalue_iterator.hpp @@ -4,15 +4,16 @@ #ifndef IS_LVALUE_ITERATOR_DWA2003112_HPP # define IS_LVALUE_ITERATOR_DWA2003112_HPP +#include + #include +#include #include #include #include #include -#include - // should be the last #includes #include #include @@ -124,14 +125,14 @@ namespace detail template struct is_readable_lvalue_iterator_impl : is_lvalue_iterator_impl< - BOOST_DEDUCED_TYPENAME std::iterator_traits::value_type const + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type const >::template rebind {}; template struct is_non_const_lvalue_iterator_impl : is_lvalue_iterator_impl< - BOOST_DEDUCED_TYPENAME std::iterator_traits::value_type + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type >::template rebind {}; } // namespace detail diff --git a/include/boost/iterator/is_readable_iterator.hpp b/include/boost/iterator/is_readable_iterator.hpp index 26827c4..5bc2339 100644 --- a/include/boost/iterator/is_readable_iterator.hpp +++ b/include/boost/iterator/is_readable_iterator.hpp @@ -6,12 +6,11 @@ #include #include +#include #include #include -#include - // should be the last #include #include #include @@ -94,7 +93,7 @@ namespace detail template struct is_readable_iterator_impl2 : is_readable_iterator_impl< - BOOST_DEDUCED_TYPENAME std::iterator_traits::value_type const + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type const >::template rebind {}; } // namespace detail diff --git a/include/boost/iterator/iterator_adaptor.hpp b/include/boost/iterator/iterator_adaptor.hpp index f803fc6..87cfd05 100644 --- a/include/boost/iterator/iterator_adaptor.hpp +++ b/include/boost/iterator/iterator_adaptor.hpp @@ -8,6 +8,8 @@ #define BOOST_ITERATOR_ADAPTOR_23022003THW_HPP #include +#include +#include #include #include diff --git a/include/boost/iterator/iterator_archetypes.hpp b/include/boost/iterator/iterator_archetypes.hpp index 9b4b543..3e9d444 100644 --- a/include/boost/iterator/iterator_archetypes.hpp +++ b/include/boost/iterator/iterator_archetypes.hpp @@ -9,6 +9,7 @@ #include #include #include +#include #include diff --git a/include/boost/iterator/iterator_categories.hpp b/include/boost/iterator/iterator_categories.hpp index baf805a..71202c9 100644 --- a/include/boost/iterator/iterator_categories.hpp +++ b/include/boost/iterator/iterator_categories.hpp @@ -7,6 +7,7 @@ # define BOOST_ITERATOR_CATEGORIES_HPP # include +# include # include # include @@ -20,8 +21,6 @@ # include -#include - namespace boost { namespace iterators { @@ -117,7 +116,7 @@ struct iterator_category_to_traversal template struct iterator_traversal : iterator_category_to_traversal< - typename std::iterator_traits::iterator_category + typename boost::detail::iterator_traits::iterator_category > {}; diff --git a/include/boost/iterator/iterator_concepts.hpp b/include/boost/iterator/iterator_concepts.hpp index 415cc49..1a9f7d6 100644 --- a/include/boost/iterator/iterator_concepts.hpp +++ b/include/boost/iterator/iterator_concepts.hpp @@ -9,6 +9,9 @@ #include #include +// Use boost::detail::iterator_traits to work around some MSVC/Dinkumware problems. +#include + #include #include @@ -24,7 +27,6 @@ #include #include -#include #include @@ -42,8 +44,8 @@ namespace boost_concepts , boost::CopyConstructible { - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::value_type value_type; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::reference reference; + typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type value_type; + typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference reference; BOOST_CONCEPT_USAGE(ReadableIterator) { @@ -57,7 +59,7 @@ namespace boost_concepts template < typename Iterator - , typename ValueType = BOOST_DEDUCED_TYPENAME std::iterator_traits::value_type + , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type > struct WritableIterator : boost::CopyConstructible @@ -73,7 +75,7 @@ namespace boost_concepts template < typename Iterator - , typename ValueType = BOOST_DEDUCED_TYPENAME std::iterator_traits::value_type + , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type > struct WritableIteratorConcept : WritableIterator {}; @@ -90,7 +92,7 @@ namespace boost_concepts BOOST_concept(LvalueIterator,(Iterator)) { - typedef typename std::iterator_traits::value_type value_type; + typedef typename boost::detail::iterator_traits::value_type value_type; BOOST_CONCEPT_USAGE(LvalueIterator) { @@ -142,7 +144,7 @@ namespace boost_concepts : SinglePassIterator , boost::DefaultConstructible { - typedef typename std::iterator_traits::difference_type difference_type; + typedef typename boost::detail::iterator_traits::difference_type difference_type; BOOST_MPL_ASSERT((boost::is_integral)); BOOST_MPL_ASSERT_RELATION(std::numeric_limits::is_signed, ==, true); @@ -219,7 +221,7 @@ namespace boost_concepts boost::random_access_traversal_tag, boost::random_access_traversal_tag) { bool b; - typename std::iterator_traits::difference_type n; + typename boost::detail::iterator_traits::difference_type n; b = i1 < i2; b = i1 <= i2; b = i1 > i2; diff --git a/include/boost/iterator/iterator_facade.hpp b/include/boost/iterator/iterator_facade.hpp index 225c53a..7b11d0a 100644 --- a/include/boost/iterator/iterator_facade.hpp +++ b/include/boost/iterator/iterator_facade.hpp @@ -8,6 +8,7 @@ #define BOOST_ITERATOR_FACADE_23022003THW_HPP #include +#include #include #include #include @@ -36,8 +37,6 @@ #include #include -#include - #include // this goes last namespace boost { diff --git a/include/boost/iterator/iterator_traits.hpp b/include/boost/iterator/iterator_traits.hpp index 6582a68..1a5f1e0 100644 --- a/include/boost/iterator/iterator_traits.hpp +++ b/include/boost/iterator/iterator_traits.hpp @@ -5,10 +5,9 @@ #ifndef ITERATOR_TRAITS_DWA200347_HPP # define ITERATOR_TRAITS_DWA200347_HPP +# include # include -#include - namespace boost { namespace iterators { @@ -20,32 +19,32 @@ namespace iterators { template struct iterator_value { - typedef typename std::iterator_traits::value_type type; + typedef typename boost::detail::iterator_traits::value_type type; }; template struct iterator_reference { - typedef typename std::iterator_traits::reference type; + typedef typename boost::detail::iterator_traits::reference type; }; template struct iterator_pointer { - typedef typename std::iterator_traits::pointer type; + typedef typename boost::detail::iterator_traits::pointer type; }; template struct iterator_difference { - typedef typename std::iterator_traits::difference_type type; + typedef typename boost::detail::iterator_traits::difference_type type; }; template struct iterator_category { - typedef typename std::iterator_traits::iterator_category type; + typedef typename boost::detail::iterator_traits::iterator_category type; }; } // namespace iterators diff --git a/include/boost/iterator/new_iterator_tests.hpp b/include/boost/iterator/new_iterator_tests.hpp index cb9b107..caad700 100644 --- a/include/boost/iterator/new_iterator_tests.hpp +++ b/include/boost/iterator/new_iterator_tests.hpp @@ -32,6 +32,7 @@ # include # include # include // for detail::dummy_constructor +# include # include # include # include @@ -75,7 +76,7 @@ template void readable_iterator_test(const Iterator i1, T v) { Iterator i2(i1); // Copy Constructible - typedef typename std::iterator_traits::reference ref_t; + typedef typename detail::iterator_traits::reference ref_t; ref_t r1 = *i1; ref_t r2 = *i2; T v1 = r1; @@ -111,9 +112,9 @@ template void swappable_iterator_test(Iterator i, Iterator j) { Iterator i2(i), j2(j); - typename std::iterator_traits::value_type bi = *i, bj = *j; + typename detail::iterator_traits::value_type bi = *i, bj = *j; iter_swap(i2, j2); - typename std::iterator_traits::value_type ai = *i, aj = *j; + typename detail::iterator_traits::value_type ai = *i, aj = *j; BOOST_TEST(bi == aj && bj == ai); } @@ -121,8 +122,8 @@ template void constant_lvalue_iterator_test(Iterator i, T v1) { Iterator i2(i); - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::reference reference; + typedef typename detail::iterator_traits::value_type value_type; + typedef typename detail::iterator_traits::reference reference; BOOST_STATIC_ASSERT((is_same::value)); const T& v2 = *i2; BOOST_TEST(v1 == v2); @@ -136,8 +137,8 @@ template void non_const_lvalue_iterator_test(Iterator i, T v1, T v2) { Iterator i2(i); - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::reference reference; + typedef typename detail::iterator_traits::value_type value_type; + typedef typename detail::iterator_traits::reference reference; BOOST_STATIC_ASSERT((is_same::value)); T& v3 = *i2; BOOST_TEST(v1 == v3); @@ -228,7 +229,7 @@ void random_access_readable_iterator_test(Iterator i, int N, TrueVals vals) { BOOST_TEST(i == j + c); BOOST_TEST(*i == vals[c]); - typename std::iterator_traits::value_type x = j[c]; + typename detail::iterator_traits::value_type x = j[c]; BOOST_TEST(*i == x); BOOST_TEST(*i == *(j + c)); BOOST_TEST(*i == *(c + j)); @@ -244,7 +245,7 @@ void random_access_readable_iterator_test(Iterator i, int N, TrueVals vals) { BOOST_TEST(i == k - c); BOOST_TEST(*i == vals[N - 1 - c]); - typename std::iterator_traits::value_type x = j[N - 1 - c]; + typename detail::iterator_traits::value_type x = j[N - 1 - c]; BOOST_TEST(*i == x); Iterator q = k - c; BOOST_TEST(*i == *q); diff --git a/include/boost/iterator/permutation_iterator.hpp b/include/boost/iterator/permutation_iterator.hpp index 3876f3d..32648b0 100644 --- a/include/boost/iterator/permutation_iterator.hpp +++ b/include/boost/iterator/permutation_iterator.hpp @@ -21,13 +21,13 @@ template< class ElementIterator class permutation_iterator : public iterator_adaptor< permutation_iterator - , IndexIterator, typename std::iterator_traits::value_type - , use_default, typename std::iterator_traits::reference> + , IndexIterator, typename boost::detail::iterator_traits::value_type + , use_default, typename boost::detail::iterator_traits::reference> { typedef iterator_adaptor< permutation_iterator - , IndexIterator, typename std::iterator_traits::value_type - , use_default, typename std::iterator_traits::reference> super_t; + , IndexIterator, typename boost::detail::iterator_traits::value_type + , use_default, typename boost::detail::iterator_traits::reference> super_t; friend class iterator_core_access; diff --git a/include/boost/iterator/reverse_iterator.hpp b/include/boost/iterator/reverse_iterator.hpp index 7dcf645..3bef39e 100644 --- a/include/boost/iterator/reverse_iterator.hpp +++ b/include/boost/iterator/reverse_iterator.hpp @@ -8,6 +8,7 @@ #define BOOST_REVERSE_ITERATOR_23022003THW_HPP #include +#include #include namespace boost { diff --git a/include/boost/iterator/transform_iterator.hpp b/include/boost/iterator/transform_iterator.hpp index 67356ff..851f16f 100644 --- a/include/boost/iterator/transform_iterator.hpp +++ b/include/boost/iterator/transform_iterator.hpp @@ -7,6 +7,7 @@ #ifndef BOOST_TRANSFORM_ITERATOR_23022003THW_HPP #define BOOST_TRANSFORM_ITERATOR_23022003THW_HPP +#include #include #include #include @@ -21,12 +22,11 @@ #include #include -#include #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) # include -#endif +#endif #include diff --git a/include/boost/iterator/zip_iterator.hpp b/include/boost/iterator/zip_iterator.hpp index 61d1f17..83fa63b 100644 --- a/include/boost/iterator/zip_iterator.hpp +++ b/include/boost/iterator/zip_iterator.hpp @@ -9,6 +9,7 @@ # define BOOST_ZIP_ITERATOR_TMB_07_13_2003_HPP_ #include +#include #include #include #include // for enable_if_convertible diff --git a/include/boost/pending/detail/int_iterator.hpp b/include/boost/pending/detail/int_iterator.hpp index dcc7024..ca8372b 100644 --- a/include/boost/pending/detail/int_iterator.hpp +++ b/include/boost/pending/detail/int_iterator.hpp @@ -6,12 +6,11 @@ #ifndef BOOST_INT_ITERATOR_H #define BOOST_INT_ITERATOR_H +#include #if !defined BOOST_MSVC #include #endif #include -#include -#include //using namespace std; #ifndef BOOST_NO_OPERATORS_IN_NAMESPACE diff --git a/include/boost/pending/iterator_tests.hpp b/include/boost/pending/iterator_tests.hpp index d515e12..37c839b 100644 --- a/include/boost/pending/iterator_tests.hpp +++ b/include/boost/pending/iterator_tests.hpp @@ -215,7 +215,7 @@ void random_access_iterator_test(Iterator i, int N, TrueVals vals) const Iterator j = i; int c; - typedef typename std::iterator_traits::value_type value_type; + typedef typename boost::detail::iterator_traits::value_type value_type; for (c = 0; c < N-1; ++c) { assert(i == j + c); diff --git a/include/boost/pointee.hpp b/include/boost/pointee.hpp index f3bcf44..0f561b8 100644 --- a/include/boost/pointee.hpp +++ b/include/boost/pointee.hpp @@ -20,8 +20,6 @@ # include # include -#include - namespace boost { namespace detail @@ -35,7 +33,7 @@ namespace detail template struct iterator_pointee { - typedef typename std::iterator_traits::value_type value_type; + typedef typename iterator_traits::value_type value_type; struct impl {