From b2b9ab156881e700858c5a104c47e006eddcc717 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Mon, 14 Sep 2015 09:34:02 +0200 Subject: [PATCH] Remove unused deprecated includes A comment in boost/iterator.hpp and boost/detail/iterator.hpp mentions that the files are obsolete and will be deprecated. All they do is pull some types from namespace std into namespace boost. --- include/boost/iterator/filter_iterator.hpp | 1 - include/boost/iterator/indirect_iterator.hpp | 6 +++--- include/boost/iterator/is_lvalue_iterator.hpp | 9 ++++----- .../boost/iterator/is_readable_iterator.hpp | 5 +++-- include/boost/iterator/iterator_adaptor.hpp | 2 -- .../boost/iterator/iterator_archetypes.hpp | 1 - .../boost/iterator/iterator_categories.hpp | 5 +++-- include/boost/iterator/iterator_concepts.hpp | 18 ++++++++---------- include/boost/iterator/iterator_facade.hpp | 3 ++- include/boost/iterator/iterator_traits.hpp | 13 +++++++------ include/boost/iterator/new_iterator_tests.hpp | 19 +++++++++---------- .../boost/iterator/permutation_iterator.hpp | 8 ++++---- include/boost/iterator/reverse_iterator.hpp | 1 - include/boost/iterator/transform_iterator.hpp | 4 ++-- include/boost/iterator/zip_iterator.hpp | 1 - include/boost/pending/detail/int_iterator.hpp | 3 ++- include/boost/pending/iterator_tests.hpp | 2 +- include/boost/pointee.hpp | 4 +++- 18 files changed, 51 insertions(+), 54 deletions(-) diff --git a/include/boost/iterator/filter_iterator.hpp b/include/boost/iterator/filter_iterator.hpp index 58aea33..b87c02b 100644 --- a/include/boost/iterator/filter_iterator.hpp +++ b/include/boost/iterator/filter_iterator.hpp @@ -7,7 +7,6 @@ #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 c16eb84..7449d62 100644 --- a/include/boost/iterator/indirect_iterator.hpp +++ b/include/boost/iterator/indirect_iterator.hpp @@ -7,12 +7,10 @@ #ifndef BOOST_INDIRECT_ITERATOR_23022003THW_HPP #define BOOST_INDIRECT_ITERATOR_23022003THW_HPP -#include #include #include #include -#include #include @@ -25,6 +23,8 @@ #include #include +#include + #ifdef BOOST_MPL_CFG_NO_HAS_XXX # include # include @@ -45,7 +45,7 @@ namespace iterators { template struct indirect_base { - typedef typename boost::detail::iterator_traits::value_type dereferenceable; + typedef typename std::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 e821da9..46f0483 100644 --- a/include/boost/iterator/is_lvalue_iterator.hpp +++ b/include/boost/iterator/is_lvalue_iterator.hpp @@ -4,16 +4,15 @@ #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 @@ -125,14 +124,14 @@ namespace detail template struct is_readable_lvalue_iterator_impl : is_lvalue_iterator_impl< - BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type const + BOOST_DEDUCED_TYPENAME std::iterator_traits::value_type const >::template rebind {}; template struct is_non_const_lvalue_iterator_impl : is_lvalue_iterator_impl< - BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type + BOOST_DEDUCED_TYPENAME std::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 5bc2339..26827c4 100644 --- a/include/boost/iterator/is_readable_iterator.hpp +++ b/include/boost/iterator/is_readable_iterator.hpp @@ -6,11 +6,12 @@ #include #include -#include #include #include +#include + // should be the last #include #include #include @@ -93,7 +94,7 @@ namespace detail template struct is_readable_iterator_impl2 : is_readable_iterator_impl< - BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type const + BOOST_DEDUCED_TYPENAME std::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 87cfd05..f803fc6 100644 --- a/include/boost/iterator/iterator_adaptor.hpp +++ b/include/boost/iterator/iterator_adaptor.hpp @@ -8,8 +8,6 @@ #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 3e9d444..9b4b543 100644 --- a/include/boost/iterator/iterator_archetypes.hpp +++ b/include/boost/iterator/iterator_archetypes.hpp @@ -9,7 +9,6 @@ #include #include #include -#include #include diff --git a/include/boost/iterator/iterator_categories.hpp b/include/boost/iterator/iterator_categories.hpp index 71202c9..baf805a 100644 --- a/include/boost/iterator/iterator_categories.hpp +++ b/include/boost/iterator/iterator_categories.hpp @@ -7,7 +7,6 @@ # define BOOST_ITERATOR_CATEGORIES_HPP # include -# include # include # include @@ -21,6 +20,8 @@ # include +#include + namespace boost { namespace iterators { @@ -116,7 +117,7 @@ struct iterator_category_to_traversal template struct iterator_traversal : iterator_category_to_traversal< - typename boost::detail::iterator_traits::iterator_category + typename std::iterator_traits::iterator_category > {}; diff --git a/include/boost/iterator/iterator_concepts.hpp b/include/boost/iterator/iterator_concepts.hpp index 1a9f7d6..415cc49 100644 --- a/include/boost/iterator/iterator_concepts.hpp +++ b/include/boost/iterator/iterator_concepts.hpp @@ -9,9 +9,6 @@ #include #include -// Use boost::detail::iterator_traits to work around some MSVC/Dinkumware problems. -#include - #include #include @@ -27,6 +24,7 @@ #include #include +#include #include @@ -44,8 +42,8 @@ namespace boost_concepts , boost::CopyConstructible { - typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type value_type; - typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference reference; + typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::value_type value_type; + typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::reference reference; BOOST_CONCEPT_USAGE(ReadableIterator) { @@ -59,7 +57,7 @@ namespace boost_concepts template < typename Iterator - , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type + , typename ValueType = BOOST_DEDUCED_TYPENAME std::iterator_traits::value_type > struct WritableIterator : boost::CopyConstructible @@ -75,7 +73,7 @@ namespace boost_concepts template < typename Iterator - , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type + , typename ValueType = BOOST_DEDUCED_TYPENAME std::iterator_traits::value_type > struct WritableIteratorConcept : WritableIterator {}; @@ -92,7 +90,7 @@ namespace boost_concepts BOOST_concept(LvalueIterator,(Iterator)) { - typedef typename boost::detail::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::value_type value_type; BOOST_CONCEPT_USAGE(LvalueIterator) { @@ -144,7 +142,7 @@ namespace boost_concepts : SinglePassIterator , boost::DefaultConstructible { - typedef typename boost::detail::iterator_traits::difference_type difference_type; + typedef typename std::iterator_traits::difference_type difference_type; BOOST_MPL_ASSERT((boost::is_integral)); BOOST_MPL_ASSERT_RELATION(std::numeric_limits::is_signed, ==, true); @@ -221,7 +219,7 @@ namespace boost_concepts boost::random_access_traversal_tag, boost::random_access_traversal_tag) { bool b; - typename boost::detail::iterator_traits::difference_type n; + typename std::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 7b11d0a..225c53a 100644 --- a/include/boost/iterator/iterator_facade.hpp +++ b/include/boost/iterator/iterator_facade.hpp @@ -8,7 +8,6 @@ #define BOOST_ITERATOR_FACADE_23022003THW_HPP #include -#include #include #include #include @@ -37,6 +36,8 @@ #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 1a5f1e0..6582a68 100644 --- a/include/boost/iterator/iterator_traits.hpp +++ b/include/boost/iterator/iterator_traits.hpp @@ -5,9 +5,10 @@ #ifndef ITERATOR_TRAITS_DWA200347_HPP # define ITERATOR_TRAITS_DWA200347_HPP -# include # include +#include + namespace boost { namespace iterators { @@ -19,32 +20,32 @@ namespace iterators { template struct iterator_value { - typedef typename boost::detail::iterator_traits::value_type type; + typedef typename std::iterator_traits::value_type type; }; template struct iterator_reference { - typedef typename boost::detail::iterator_traits::reference type; + typedef typename std::iterator_traits::reference type; }; template struct iterator_pointer { - typedef typename boost::detail::iterator_traits::pointer type; + typedef typename std::iterator_traits::pointer type; }; template struct iterator_difference { - typedef typename boost::detail::iterator_traits::difference_type type; + typedef typename std::iterator_traits::difference_type type; }; template struct iterator_category { - typedef typename boost::detail::iterator_traits::iterator_category type; + typedef typename std::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 caad700..cb9b107 100644 --- a/include/boost/iterator/new_iterator_tests.hpp +++ b/include/boost/iterator/new_iterator_tests.hpp @@ -32,7 +32,6 @@ # include # include # include // for detail::dummy_constructor -# include # include # include # include @@ -76,7 +75,7 @@ template void readable_iterator_test(const Iterator i1, T v) { Iterator i2(i1); // Copy Constructible - typedef typename detail::iterator_traits::reference ref_t; + typedef typename std::iterator_traits::reference ref_t; ref_t r1 = *i1; ref_t r2 = *i2; T v1 = r1; @@ -112,9 +111,9 @@ template void swappable_iterator_test(Iterator i, Iterator j) { Iterator i2(i), j2(j); - typename detail::iterator_traits::value_type bi = *i, bj = *j; + typename std::iterator_traits::value_type bi = *i, bj = *j; iter_swap(i2, j2); - typename detail::iterator_traits::value_type ai = *i, aj = *j; + typename std::iterator_traits::value_type ai = *i, aj = *j; BOOST_TEST(bi == aj && bj == ai); } @@ -122,8 +121,8 @@ template void constant_lvalue_iterator_test(Iterator i, T v1) { Iterator i2(i); - typedef typename detail::iterator_traits::value_type value_type; - typedef typename detail::iterator_traits::reference reference; + typedef typename std::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::reference reference; BOOST_STATIC_ASSERT((is_same::value)); const T& v2 = *i2; BOOST_TEST(v1 == v2); @@ -137,8 +136,8 @@ template void non_const_lvalue_iterator_test(Iterator i, T v1, T v2) { Iterator i2(i); - typedef typename detail::iterator_traits::value_type value_type; - typedef typename detail::iterator_traits::reference reference; + typedef typename std::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::reference reference; BOOST_STATIC_ASSERT((is_same::value)); T& v3 = *i2; BOOST_TEST(v1 == v3); @@ -229,7 +228,7 @@ void random_access_readable_iterator_test(Iterator i, int N, TrueVals vals) { BOOST_TEST(i == j + c); BOOST_TEST(*i == vals[c]); - typename detail::iterator_traits::value_type x = j[c]; + typename std::iterator_traits::value_type x = j[c]; BOOST_TEST(*i == x); BOOST_TEST(*i == *(j + c)); BOOST_TEST(*i == *(c + j)); @@ -245,7 +244,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 detail::iterator_traits::value_type x = j[N - 1 - c]; + typename std::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 32648b0..3876f3d 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 boost::detail::iterator_traits::value_type - , use_default, typename boost::detail::iterator_traits::reference> + , IndexIterator, typename std::iterator_traits::value_type + , use_default, typename std::iterator_traits::reference> { typedef iterator_adaptor< permutation_iterator - , IndexIterator, typename boost::detail::iterator_traits::value_type - , use_default, typename boost::detail::iterator_traits::reference> super_t; + , IndexIterator, typename std::iterator_traits::value_type + , use_default, typename std::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 3bef39e..7dcf645 100644 --- a/include/boost/iterator/reverse_iterator.hpp +++ b/include/boost/iterator/reverse_iterator.hpp @@ -8,7 +8,6 @@ #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 851f16f..67356ff 100644 --- a/include/boost/iterator/transform_iterator.hpp +++ b/include/boost/iterator/transform_iterator.hpp @@ -7,7 +7,6 @@ #ifndef BOOST_TRANSFORM_ITERATOR_23022003THW_HPP #define BOOST_TRANSFORM_ITERATOR_23022003THW_HPP -#include #include #include #include @@ -22,11 +21,12 @@ #include #include +#include #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) # include - #endif + #include diff --git a/include/boost/iterator/zip_iterator.hpp b/include/boost/iterator/zip_iterator.hpp index 83fa63b..61d1f17 100644 --- a/include/boost/iterator/zip_iterator.hpp +++ b/include/boost/iterator/zip_iterator.hpp @@ -9,7 +9,6 @@ # 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 ca8372b..dcc7024 100644 --- a/include/boost/pending/detail/int_iterator.hpp +++ b/include/boost/pending/detail/int_iterator.hpp @@ -6,11 +6,12 @@ #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 37c839b..d515e12 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 boost::detail::iterator_traits::value_type value_type; + typedef typename std::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 0f561b8..f3bcf44 100644 --- a/include/boost/pointee.hpp +++ b/include/boost/pointee.hpp @@ -20,6 +20,8 @@ # include # include +#include + namespace boost { namespace detail @@ -33,7 +35,7 @@ namespace detail template struct iterator_pointee { - typedef typename iterator_traits::value_type value_type; + typedef typename std::iterator_traits::value_type value_type; struct impl {