Skip to content

Commit a6d17ec

Browse files
committed
Replace several Boost headers with C++11/C++14 STL alternatives.
1 parent 73cd3b7 commit a6d17ec

File tree

148 files changed

+764
-1160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+764
-1160
lines changed

extensions/test/gis/io/wkb/read_wkb.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10+
#include <cstdint>
1011
#include <iterator>
1112
#include <string>
1213
#include <vector>
1314

1415
#include <boost/test/included/test_exec_monitor.hpp>
1516
#include <boost/test/included/unit_test.hpp>
1617
#include <boost/test/tools/floating_point_comparison.hpp>
17-
#include <boost/cstdint.hpp>
1818
#include <boost/geometry/strategies/strategies.hpp>
1919

2020
#include <boost/geometry/algorithms/equals.hpp>
@@ -37,7 +37,7 @@ namespace bg = boost::geometry;
3737

3838
namespace { // anonymous
3939

40-
typedef std::vector<boost::uint8_t> byte_vector;
40+
typedef std::vector<std::uint8_t> byte_vector;
4141

4242
template <typename Geometry>
4343
void test_geometry_wrong_wkb(std::string const& wkbhex, std::string const& wkt)

extensions/test/gis/io/wkb/write_wkb.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@
1111
#include <string>
1212
#include <vector>
1313

14-
#include <iostream>
15-
1614
#include <boost/test/included/test_exec_monitor.hpp>
1715
#include <boost/test/included/unit_test.hpp>
1816
#include <boost/test/tools/floating_point_comparison.hpp>
19-
#include <boost/cstdint.hpp>
2017
#include <boost/geometry/strategies/strategies.hpp>
2118

2219
#include <boost/geometry/algorithms/equals.hpp>

include/boost/geometry/algorithms/area.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
#ifndef BOOST_GEOMETRY_ALGORITHMS_AREA_HPP
2121
#define BOOST_GEOMETRY_ALGORITHMS_AREA_HPP
2222

23-
#include <boost/core/ignore_unused.hpp>
23+
#include <tuple>
24+
2425
#include <boost/range/begin.hpp>
2526
#include <boost/range/end.hpp>
2627
#include <boost/range/size.hpp>
@@ -91,7 +92,7 @@ struct ring_area
9192
assert_dimension<Ring, 2>();
9293

9394
// Ignore warning (because using static method sometimes) on strategy
94-
boost::ignore_unused(strategies);
95+
std::ignore = strategies;
9596

9697
// An open ring has at least three points,
9798
// A closed ring has at least four points,

include/boost/geometry/algorithms/centroid.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424

2525
#include <cstddef>
26+
#include <tuple>
2627

27-
#include <boost/core/ignore_unused.hpp>
2828
#include <boost/range/begin.hpp>
2929
#include <boost/range/end.hpp>
3030
#include <boost/range/size.hpp>
@@ -168,7 +168,7 @@ struct centroid_range_state
168168
Strategy const& strategy,
169169
State& state)
170170
{
171-
boost::ignore_unused(strategy);
171+
std::ignore = strategy;
172172

173173
detail::closed_view<Ring const> const view(ring);
174174
auto it = boost::begin(view);
@@ -296,7 +296,7 @@ struct centroid_multi_point_state
296296
Strategy const& strategy,
297297
State& state)
298298
{
299-
boost::ignore_unused(strategy);
299+
std::ignore = strategy;
300300
strategy.apply(static_cast<Point const&>(transformer.apply(point)),
301301
state);
302302
}

include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <cstddef>
1919
#include <iterator>
2020

21-
#include <boost/core/ignore_unused.hpp>
2221
#include <boost/range/begin.hpp>
2322
#include <boost/range/end.hpp>
2423
#include <boost/range/rbegin.hpp>
@@ -219,8 +218,6 @@ struct buffer_range
219218
output_point_type& last_p1,
220219
output_point_type& last_p2)
221220
{
222-
boost::ignore_unused(segment_strategy);
223-
224221
using point_type = typename std::iterator_traits
225222
<
226223
Iterator
@@ -915,8 +912,6 @@ inline void buffer_inserter(GeometryInput const& geometry_input, OutputIterator
915912
VisitPiecesPolicy& visit_pieces_policy
916913
)
917914
{
918-
boost::ignore_unused(visit_pieces_policy);
919-
920915
using collection_type = detail::buffer::buffered_piece_collection
921916
<
922917
geometry::ring_type_t<GeometryOutput>,

include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#include <algorithm>
1919
#include <cstddef>
2020
#include <set>
21+
#include <tuple>
2122

22-
#include <boost/core/ignore_unused.hpp>
2323
#include <boost/range/begin.hpp>
2424
#include <boost/range/empty.hpp>
2525
#include <boost/range/end.hpp>
@@ -838,7 +838,7 @@ struct buffered_piece_collection
838838
inline void add_endcap(EndcapStrategy const& strategy, Range const& range,
839839
point_type const& end_point)
840840
{
841-
boost::ignore_unused(strategy);
841+
std::ignore = strategy;
842842

843843
if (range.empty())
844844
{

include/boost/geometry/algorithms/detail/buffer/get_piece_turns.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_BUFFER_GET_PIECE_TURNS_HPP
1616
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_BUFFER_GET_PIECE_TURNS_HPP
1717

18-
#include <boost/core/ignore_unused.hpp>
1918
#include <boost/range/begin.hpp>
2019
#include <boost/range/end.hpp>
2120
#include <boost/range/value_type.hpp>
@@ -288,10 +287,8 @@ class piece_turn_visitor
288287

289288
template <typename Section>
290289
inline bool apply(Section const& section1, Section const& section2,
291-
bool first = true)
290+
bool = true)
292291
{
293-
boost::ignore_unused(first);
294-
295292
auto const& piece1 = m_pieces[section1.ring_id.source_index];
296293
auto const& piece2 = m_pieces[section2.ring_id.source_index];
297294

include/boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_BUFFER_TURN_IN_ORIGINAL_VISITOR
1616

1717

18-
#include <boost/core/ignore_unused.hpp>
18+
#include <tuple>
19+
1920
#include <boost/range/size.hpp>
2021

2122
#include <boost/geometry/core/coordinate_type.hpp>
@@ -114,7 +115,7 @@ template
114115
inline bool point_in_range(Strategy& strategy, State& state,
115116
Point const& point, Iterator begin, Iterator end)
116117
{
117-
boost::ignore_unused(strategy);
118+
std::ignore = strategy;
118119

119120
Iterator it = begin;
120121
for (Iterator previous = it++; it != end; ++previous, ++it)

include/boost/geometry/algorithms/detail/centroid/translating_transformer.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919

2020

2121
#include <cstddef>
22-
23-
#include <boost/core/addressof.hpp>
24-
#include <boost/core/ref.hpp>
22+
#include <functional>
23+
#include <memory>
2524

2625
#include <boost/geometry/core/cs.hpp>
2726
#include <boost/geometry/core/tag_cast.hpp>
@@ -54,7 +53,7 @@ template
5453
struct translating_transformer
5554
{
5655
using point_type = geometry::point_type_t<Geometry>;
57-
using result_type = boost::reference_wrapper<point_type const>;
56+
using result_type = std::reference_wrapper<point_type const>;
5857

5958
explicit translating_transformer(Geometry const&) {}
6059
explicit translating_transformer(point_type const&) {}
@@ -82,12 +81,12 @@ struct translating_transformer<Geometry, areal_tag, cartesian_tag>
8281
pt_it = geometry::points_begin(geom);
8382
if ( pt_it != geometry::points_end(geom) )
8483
{
85-
m_origin = boost::addressof(*pt_it);
84+
m_origin = std::addressof(*pt_it);
8685
}
8786
}
8887

8988
explicit translating_transformer(point_type const& origin)
90-
: m_origin(boost::addressof(origin))
89+
: m_origin(std::addressof(origin))
9190
{}
9291

9392
result_type apply(point_type const& pt) const

include/boost/geometry/algorithms/detail/closest_feature/range_to_range.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ class range_to_range_rtree
8080

8181
BOOST_GEOMETRY_ASSERT( n > 0 );
8282
// n above is unused outside BOOST_GEOMETRY_ASSERT,
83-
// hence the call to boost::ignore_unused below
83+
// hence the use of std::ignore below
8484
//
8585
// however, t_v (initialized by the call to rt.query(...))
8686
// is used below, which is why we cannot put the call to
8787
// rt.query(...) inside BOOST_GEOMETRY_ASSERT
88-
boost::ignore_unused(n);
88+
std::ignore = n;
8989

9090
Distance dist = dispatch::distance
9191
<

0 commit comments

Comments
 (0)