Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extensions/test/gis/io/wkb/read_wkb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <cstdint>
#include <iterator>
#include <string>
#include <vector>

#include <boost/test/included/test_exec_monitor.hpp>
#include <boost/test/included/unit_test.hpp>
#include <boost/test/tools/floating_point_comparison.hpp>
#include <boost/cstdint.hpp>
#include <boost/geometry/strategies/strategies.hpp>

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

namespace { // anonymous

typedef std::vector<boost::uint8_t> byte_vector;
typedef std::vector<std::uint8_t> byte_vector;

template <typename Geometry>
void test_geometry_wrong_wkb(std::string const& wkbhex, std::string const& wkt)
Expand Down
3 changes: 0 additions & 3 deletions extensions/test/gis/io/wkb/write_wkb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@
#include <string>
#include <vector>

#include <iostream>

#include <boost/test/included/test_exec_monitor.hpp>
#include <boost/test/included/unit_test.hpp>
#include <boost/test/tools/floating_point_comparison.hpp>
#include <boost/cstdint.hpp>
#include <boost/geometry/strategies/strategies.hpp>

#include <boost/geometry/algorithms/equals.hpp>
Expand Down
5 changes: 3 additions & 2 deletions include/boost/geometry/algorithms/area.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
#ifndef BOOST_GEOMETRY_ALGORITHMS_AREA_HPP
#define BOOST_GEOMETRY_ALGORITHMS_AREA_HPP

#include <boost/core/ignore_unused.hpp>
#include <tuple>

#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/size.hpp>
Expand Down Expand Up @@ -91,7 +92,7 @@ struct ring_area
assert_dimension<Ring, 2>();

// Ignore warning (because using static method sometimes) on strategy
boost::ignore_unused(strategies);
std::ignore = strategies;

// An open ring has at least three points,
// A closed ring has at least four points,
Expand Down
6 changes: 3 additions & 3 deletions include/boost/geometry/algorithms/centroid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@


#include <cstddef>
#include <tuple>

#include <boost/core/ignore_unused.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/size.hpp>
Expand Down Expand Up @@ -168,7 +168,7 @@ struct centroid_range_state
Strategy const& strategy,
State& state)
{
boost::ignore_unused(strategy);
std::ignore = strategy;

detail::closed_view<Ring const> const view(ring);
auto it = boost::begin(view);
Expand Down Expand Up @@ -296,7 +296,7 @@ struct centroid_multi_point_state
Strategy const& strategy,
State& state)
{
boost::ignore_unused(strategy);
std::ignore = strategy;
strategy.apply(static_cast<Point const&>(transformer.apply(point)),
state);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <cstddef>
#include <iterator>

#include <boost/core/ignore_unused.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/rbegin.hpp>
Expand Down Expand Up @@ -219,8 +218,6 @@ struct buffer_range
output_point_type& last_p1,
output_point_type& last_p2)
{
boost::ignore_unused(segment_strategy);

using point_type = typename std::iterator_traits
<
Iterator
Expand Down Expand Up @@ -915,8 +912,6 @@ inline void buffer_inserter(GeometryInput const& geometry_input, OutputIterator
VisitPiecesPolicy& visit_pieces_policy
)
{
boost::ignore_unused(visit_pieces_policy);

using collection_type = detail::buffer::buffered_piece_collection
<
geometry::ring_type_t<GeometryOutput>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include <algorithm>
#include <cstddef>
#include <set>
#include <tuple>

#include <boost/core/ignore_unused.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/empty.hpp>
#include <boost/range/end.hpp>
Expand Down Expand Up @@ -838,7 +838,7 @@ struct buffered_piece_collection
inline void add_endcap(EndcapStrategy const& strategy, Range const& range,
point_type const& end_point)
{
boost::ignore_unused(strategy);
std::ignore = strategy;

if (range.empty())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_BUFFER_GET_PIECE_TURNS_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_BUFFER_GET_PIECE_TURNS_HPP

#include <boost/core/ignore_unused.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/value_type.hpp>
Expand Down Expand Up @@ -288,10 +287,8 @@ class piece_turn_visitor

template <typename Section>
inline bool apply(Section const& section1, Section const& section2,
bool first = true)
bool = true)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we can remove it. I'm fine with it like this in this PR, we can change it in a follow up

{
boost::ignore_unused(first);

auto const& piece1 = m_pieces[section1.ring_id.source_index];
auto const& piece2 = m_pieces[section2.ring_id.source_index];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_BUFFER_TURN_IN_ORIGINAL_VISITOR


#include <boost/core/ignore_unused.hpp>
#include <tuple>

#include <boost/range/size.hpp>

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

Iterator it = begin;
for (Iterator previous = it++; it != end; ++previous, ++it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@


#include <cstddef>

#include <boost/core/addressof.hpp>
#include <boost/core/ref.hpp>
#include <functional>
#include <memory>

#include <boost/geometry/core/cs.hpp>
#include <boost/geometry/core/tag_cast.hpp>
Expand Down Expand Up @@ -54,7 +53,7 @@ template
struct translating_transformer
{
using point_type = geometry::point_type_t<Geometry>;
using result_type = boost::reference_wrapper<point_type const>;
using result_type = std::reference_wrapper<point_type const>;

explicit translating_transformer(Geometry const&) {}
explicit translating_transformer(point_type const&) {}
Expand Down Expand Up @@ -82,12 +81,12 @@ struct translating_transformer<Geometry, areal_tag, cartesian_tag>
pt_it = geometry::points_begin(geom);
if ( pt_it != geometry::points_end(geom) )
{
m_origin = boost::addressof(*pt_it);
m_origin = std::addressof(*pt_it);
}
}

explicit translating_transformer(point_type const& origin)
: m_origin(boost::addressof(origin))
: m_origin(std::addressof(origin))
{}

result_type apply(point_type const& pt) const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ class range_to_range_rtree

BOOST_GEOMETRY_ASSERT( n > 0 );
// n above is unused outside BOOST_GEOMETRY_ASSERT,
// hence the call to boost::ignore_unused below
// hence the use of std::ignore below
//
// however, t_v (initialized by the call to rt.query(...))
// is used below, which is why we cannot put the call to
// rt.query(...) inside BOOST_GEOMETRY_ASSERT
boost::ignore_unused(n);
std::ignore = n;

Distance dist = dispatch::distance
<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_CLOSEST_POINTS_POINT_TO_GEOMETRY_HPP

#include <iterator>
#include <tuple>
#include <type_traits>

#include <boost/core/ignore_unused.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/size.hpp>
Expand Down Expand Up @@ -72,7 +72,7 @@ struct point_to_segment
geometry::detail::assign_point_from_index<0>(segment, p[0]);
geometry::detail::assign_point_from_index<1>(segment, p[1]);

boost::ignore_unused(strategies);
std::ignore = strategies;

auto closest_point = strategies.closest_points(point, segment)
.apply(point, p[0], p[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_COVERED_BY_IMPLEMENTATION_HPP

#include <cstddef>
#include <boost/core/ignore_unused.hpp>
#include <boost/geometry/algorithms/detail/covered_by/interface.hpp>
#include <boost/geometry/algorithms/detail/within/implementation.hpp>
#include <boost/geometry/strategies/relate/cartesian.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_BOX_TO_BOX_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_BOX_TO_BOX_HPP

#include <boost/core/ignore_unused.hpp>
#include <tuple>

#include <boost/geometry/core/point_type.hpp>
#include <boost/geometry/core/tags.hpp>
Expand Down Expand Up @@ -39,7 +39,7 @@ struct distance
{
static inline auto apply(Box1 const& box1, Box2 const& box2, Strategies const& strategies)
{
boost::ignore_unused(strategies);
std::ignore = strategies;
return strategies.distance(box1, box2).apply(box1, box2);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_POINT_TO_GEOMETRY_HPP

#include <iterator>
#include <tuple>
#include <type_traits>

#include <boost/core/ignore_unused.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/size.hpp>
Expand Down Expand Up @@ -71,7 +71,7 @@ struct point_to_point
static inline
auto apply(P1 const& p1, P2 const& p2, Strategies const& strategies)
{
boost::ignore_unused(strategies);
std::ignore = strategies;
return strategies.distance(p1, p2).apply(p1, p2);
}
};
Expand All @@ -84,7 +84,7 @@ struct point_to_point<P1, P2, Strategy, false>
static inline
auto apply(P1 const& p1, P2 const& p2, Strategy const& strategy)
{
boost::ignore_unused(strategy);
std::ignore = strategy;
return strategy.apply(p1, p2);
}
};
Expand All @@ -104,7 +104,7 @@ struct point_to_segment
geometry::detail::assign_point_from_index<0>(segment, p[0]);
geometry::detail::assign_point_from_index<1>(segment, p[1]);

boost::ignore_unused(strategies);
std::ignore = strategies;
return strategies.distance(point, segment).apply(point, p[0], p[1]);
}
};
Expand All @@ -121,7 +121,7 @@ struct point_to_segment<Point, Segment, Strategy, false>
geometry::detail::assign_point_from_index<0>(segment, p[0]);
geometry::detail::assign_point_from_index<1>(segment, p[1]);

boost::ignore_unused(strategy);
std::ignore = strategy;
return strategy.apply(point, p[0], p[1]);
}
};
Expand All @@ -137,7 +137,7 @@ struct point_to_box
static inline auto apply(Point const& point, Box const& box,
Strategies const& strategies)
{
boost::ignore_unused(strategies);
std::ignore = strategies;
return strategies.distance(point, box).apply(point, box);
}
};
Expand All @@ -150,7 +150,7 @@ struct point_to_box<Point, Box, Strategy, false>
static inline auto apply(Point const& point, Box const& box,
Strategy const& strategy)
{
boost::ignore_unused(strategy);
std::ignore = strategy;
return strategy.apply(point, box);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@

#include <cstddef>
#include <functional>
#include <tuple>
#include <type_traits>
#include <vector>

#include <boost/core/ignore_unused.hpp>

#include <boost/geometry/algorithms/detail/assign_box_corners.hpp>
#include <boost/geometry/algorithms/detail/assign_indexed_point.hpp>
#include <boost/geometry/algorithms/detail/closest_feature/point_to_range.hpp>
Expand Down Expand Up @@ -222,7 +221,7 @@ class segment_to_box_2D_generic<Segment, Box, Strategies, true> // Use both Poin
<
ps_strategy_type
>::apply(ps_strategy);
boost::ignore_unused(ps_strategy, ps_cstrategy);
std::ignore = ps_cstrategy;

for (unsigned int i = 0; i < 4; ++i)
{
Expand All @@ -234,7 +233,7 @@ class segment_to_box_2D_generic<Segment, Box, Strategies, true> // Use both Poin
<
pb_strategy_type
>::apply(pb_strategy);
boost::ignore_unused(pb_strategy, pb_cstrategy);
std::ignore = pb_cstrategy;

cd[4] = pb_cstrategy.apply(p[0], box);
cd[5] = pb_cstrategy.apply(p[1], box);
Expand Down
2 changes: 0 additions & 2 deletions include/boost/geometry/algorithms/detail/expand/segment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_SEGMENT_HPP


#include <boost/core/ignore_unused.hpp>

#include <boost/geometry/algorithms/dispatch/expand.hpp>

#include <boost/geometry/core/tags.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERSECTION_AREAL_AREAL_HPP


#include <boost/core/ignore_unused.hpp>

#include <boost/geometry/algorithms/detail/intersection/interface.hpp>


Expand Down Expand Up @@ -80,14 +78,11 @@ struct intersection_areal_areal_<TupledOut, tupled_output_tag>
TupledOut
>::type;

boost::ignore_unused
<
geometry::detail::expect_output
<
Areal1, Areal2, single_out,
point_tag, linestring_tag, polygon_tag
>
>();
(void)sizeof(geometry::detail::expect_output
<
Areal1, Areal2, single_out,
point_tag, linestring_tag, polygon_tag
>);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This I don't like so much. ignore_unused was meant exactly to avoid this cryptic statement.
Is it solveable in another way?

(Why is the whole statement there anyway - but that is another question...)

Copy link
Collaborator Author

@tinko92 tinko92 Aug 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will test taking a pointer of this type and assign it to ignore. I will also try to check why this statement was there, maybe it can be dropped.


using areal = geometry::detail::output_geometry_access
<
Expand Down
Loading