Skip to content

Commit b2b9ab1

Browse files
committed
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.
1 parent 398bbe6 commit b2b9ab1

18 files changed

Lines changed: 51 additions & 54 deletions

include/boost/iterator/filter_iterator.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#ifndef BOOST_FILTER_ITERATOR_23022003THW_HPP
88
#define BOOST_FILTER_ITERATOR_23022003THW_HPP
99

10-
#include <boost/iterator.hpp>
1110
#include <boost/iterator/iterator_adaptor.hpp>
1211
#include <boost/iterator/iterator_categories.hpp>
1312

include/boost/iterator/indirect_iterator.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@
77
#ifndef BOOST_INDIRECT_ITERATOR_23022003THW_HPP
88
#define BOOST_INDIRECT_ITERATOR_23022003THW_HPP
99

10-
#include <boost/iterator.hpp>
1110
#include <boost/iterator/iterator_adaptor.hpp>
1211

1312
#include <boost/pointee.hpp>
1413
#include <boost/indirect_reference.hpp>
15-
#include <boost/detail/iterator.hpp>
1614

1715
#include <boost/detail/indirect_traits.hpp>
1816

@@ -25,6 +23,8 @@
2523
#include <boost/mpl/not.hpp>
2624
#include <boost/mpl/has_xxx.hpp>
2725

26+
#include <iterator>
27+
2828
#ifdef BOOST_MPL_CFG_NO_HAS_XXX
2929
# include <boost/shared_ptr.hpp>
3030
# include <boost/scoped_ptr.hpp>
@@ -45,7 +45,7 @@ namespace iterators {
4545
template <class Iter, class Value, class Category, class Reference, class Difference>
4646
struct indirect_base
4747
{
48-
typedef typename boost::detail::iterator_traits<Iter>::value_type dereferenceable;
48+
typedef typename std::iterator_traits<Iter>::value_type dereferenceable;
4949

5050
typedef iterator_adaptor<
5151
indirect_iterator<Iter, Value, Category, Reference, Difference>

include/boost/iterator/is_lvalue_iterator.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44
#ifndef IS_LVALUE_ITERATOR_DWA2003112_HPP
55
# define IS_LVALUE_ITERATOR_DWA2003112_HPP
66

7-
#include <boost/iterator.hpp>
8-
97
#include <boost/detail/workaround.hpp>
10-
#include <boost/detail/iterator.hpp>
118

129
#include <boost/type_traits/add_lvalue_reference.hpp>
1310
#include <boost/iterator/detail/any_conversion_eater.hpp>
1411
#include <boost/mpl/bool.hpp>
1512
#include <boost/mpl/aux_/lambda_support.hpp>
1613

14+
#include <iterator>
15+
1716
// should be the last #includes
1817
#include <boost/type_traits/integral_constant.hpp>
1918
#include <boost/iterator/detail/config_def.hpp>
@@ -125,14 +124,14 @@ namespace detail
125124
template <class It>
126125
struct is_readable_lvalue_iterator_impl
127126
: is_lvalue_iterator_impl<
128-
BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<It>::value_type const
127+
BOOST_DEDUCED_TYPENAME std::iterator_traits<It>::value_type const
129128
>::template rebind<It>
130129
{};
131130

132131
template <class It>
133132
struct is_non_const_lvalue_iterator_impl
134133
: is_lvalue_iterator_impl<
135-
BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<It>::value_type
134+
BOOST_DEDUCED_TYPENAME std::iterator_traits<It>::value_type
136135
>::template rebind<It>
137136
{};
138137
} // namespace detail

include/boost/iterator/is_readable_iterator.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66

77
#include <boost/mpl/bool.hpp>
88
#include <boost/mpl/aux_/lambda_support.hpp>
9-
#include <boost/detail/iterator.hpp>
109
#include <boost/type_traits/add_lvalue_reference.hpp>
1110

1211
#include <boost/iterator/detail/any_conversion_eater.hpp>
1312

13+
#include <iterator>
14+
1415
// should be the last #include
1516
#include <boost/type_traits/integral_constant.hpp>
1617
#include <boost/iterator/detail/config_def.hpp>
@@ -93,7 +94,7 @@ namespace detail
9394
template <class It>
9495
struct is_readable_iterator_impl2
9596
: is_readable_iterator_impl<
96-
BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<It>::value_type const
97+
BOOST_DEDUCED_TYPENAME std::iterator_traits<It>::value_type const
9798
>::template rebind<It>
9899
{};
99100
} // namespace detail

include/boost/iterator/iterator_adaptor.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#define BOOST_ITERATOR_ADAPTOR_23022003THW_HPP
99

1010
#include <boost/static_assert.hpp>
11-
#include <boost/iterator.hpp>
12-
#include <boost/detail/iterator.hpp>
1311

1412
#include <boost/iterator/iterator_categories.hpp>
1513
#include <boost/iterator/iterator_facade.hpp>

include/boost/iterator/iterator_archetypes.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <boost/iterator/iterator_categories.hpp>
1010
#include <boost/operators.hpp>
1111
#include <boost/static_assert.hpp>
12-
#include <boost/iterator.hpp>
1312

1413
#include <boost/iterator/detail/facade_iterator_category.hpp>
1514

include/boost/iterator/iterator_categories.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
# define BOOST_ITERATOR_CATEGORIES_HPP
88

99
# include <boost/config.hpp>
10-
# include <boost/detail/iterator.hpp>
1110
# include <boost/iterator/detail/config_def.hpp>
1211

1312
# include <boost/detail/workaround.hpp>
@@ -21,6 +20,8 @@
2120

2221
# include <boost/static_assert.hpp>
2322

23+
#include <iterator>
24+
2425
namespace boost {
2526
namespace iterators {
2627

@@ -116,7 +117,7 @@ struct iterator_category_to_traversal
116117
template <class Iterator = mpl::_1>
117118
struct iterator_traversal
118119
: iterator_category_to_traversal<
119-
typename boost::detail::iterator_traits<Iterator>::iterator_category
120+
typename std::iterator_traits<Iterator>::iterator_category
120121
>
121122
{};
122123

include/boost/iterator/iterator_concepts.hpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
#include <boost/concept_check.hpp>
1010
#include <boost/iterator/iterator_categories.hpp>
1111

12-
// Use boost::detail::iterator_traits to work around some MSVC/Dinkumware problems.
13-
#include <boost/detail/iterator.hpp>
14-
1512
#include <boost/type_traits/is_same.hpp>
1613
#include <boost/type_traits/is_integral.hpp>
1714

@@ -27,6 +24,7 @@
2724
#include <boost/config.hpp>
2825

2926
#include <algorithm>
27+
#include <iterator>
3028

3129
#include <boost/concept/detail/concept_def.hpp>
3230

@@ -44,8 +42,8 @@ namespace boost_concepts
4442
, boost::CopyConstructible<Iterator>
4543

4644
{
47-
typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type value_type;
48-
typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::reference reference;
45+
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::value_type value_type;
46+
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::reference reference;
4947

5048
BOOST_CONCEPT_USAGE(ReadableIterator)
5149
{
@@ -59,7 +57,7 @@ namespace boost_concepts
5957

6058
template <
6159
typename Iterator
62-
, typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type
60+
, typename ValueType = BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::value_type
6361
>
6462
struct WritableIterator
6563
: boost::CopyConstructible<Iterator>
@@ -75,7 +73,7 @@ namespace boost_concepts
7573

7674
template <
7775
typename Iterator
78-
, typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type
76+
, typename ValueType = BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::value_type
7977
>
8078
struct WritableIteratorConcept : WritableIterator<Iterator,ValueType> {};
8179

@@ -92,7 +90,7 @@ namespace boost_concepts
9290

9391
BOOST_concept(LvalueIterator,(Iterator))
9492
{
95-
typedef typename boost::detail::iterator_traits<Iterator>::value_type value_type;
93+
typedef typename std::iterator_traits<Iterator>::value_type value_type;
9694

9795
BOOST_CONCEPT_USAGE(LvalueIterator)
9896
{
@@ -144,7 +142,7 @@ namespace boost_concepts
144142
: SinglePassIterator<Iterator>
145143
, boost::DefaultConstructible<Iterator>
146144
{
147-
typedef typename boost::detail::iterator_traits<Iterator>::difference_type difference_type;
145+
typedef typename std::iterator_traits<Iterator>::difference_type difference_type;
148146

149147
BOOST_MPL_ASSERT((boost::is_integral<difference_type>));
150148
BOOST_MPL_ASSERT_RELATION(std::numeric_limits<difference_type>::is_signed, ==, true);
@@ -221,7 +219,7 @@ namespace boost_concepts
221219
boost::random_access_traversal_tag, boost::random_access_traversal_tag)
222220
{
223221
bool b;
224-
typename boost::detail::iterator_traits<Iterator2>::difference_type n;
222+
typename std::iterator_traits<Iterator2>::difference_type n;
225223
b = i1 < i2;
226224
b = i1 <= i2;
227225
b = i1 > i2;

include/boost/iterator/iterator_facade.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#define BOOST_ITERATOR_FACADE_23022003THW_HPP
99

1010
#include <boost/config.hpp>
11-
#include <boost/iterator.hpp>
1211
#include <boost/iterator/interoperable.hpp>
1312
#include <boost/iterator/iterator_traits.hpp>
1413
#include <boost/iterator/iterator_categories.hpp>
@@ -37,6 +36,8 @@
3736
#include <boost/mpl/apply.hpp>
3837
#include <boost/mpl/identity.hpp>
3938

39+
#include <cstddef>
40+
4041
#include <boost/iterator/detail/config_def.hpp> // this goes last
4142

4243
namespace boost {

include/boost/iterator/iterator_traits.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
#ifndef ITERATOR_TRAITS_DWA200347_HPP
66
# define ITERATOR_TRAITS_DWA200347_HPP
77

8-
# include <boost/detail/iterator.hpp>
98
# include <boost/detail/workaround.hpp>
109

10+
#include <iterator>
11+
1112
namespace boost {
1213
namespace iterators {
1314

@@ -19,32 +20,32 @@ namespace iterators {
1920
template <class Iterator>
2021
struct iterator_value
2122
{
22-
typedef typename boost::detail::iterator_traits<Iterator>::value_type type;
23+
typedef typename std::iterator_traits<Iterator>::value_type type;
2324
};
2425

2526
template <class Iterator>
2627
struct iterator_reference
2728
{
28-
typedef typename boost::detail::iterator_traits<Iterator>::reference type;
29+
typedef typename std::iterator_traits<Iterator>::reference type;
2930
};
3031

3132

3233
template <class Iterator>
3334
struct iterator_pointer
3435
{
35-
typedef typename boost::detail::iterator_traits<Iterator>::pointer type;
36+
typedef typename std::iterator_traits<Iterator>::pointer type;
3637
};
3738

3839
template <class Iterator>
3940
struct iterator_difference
4041
{
41-
typedef typename boost::detail::iterator_traits<Iterator>::difference_type type;
42+
typedef typename std::iterator_traits<Iterator>::difference_type type;
4243
};
4344

4445
template <class Iterator>
4546
struct iterator_category
4647
{
47-
typedef typename boost::detail::iterator_traits<Iterator>::iterator_category type;
48+
typedef typename std::iterator_traits<Iterator>::iterator_category type;
4849
};
4950

5051
} // namespace iterators

0 commit comments

Comments
 (0)