From c218f32242f338efa439b0a5421bd65fb319eb24 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 11 Aug 2014 14:24:25 +0300 Subject: [PATCH] [algorithms][distance] add a comment about the usage of boost::ignore_unused --- .../detail/distance/geometry_to_geometry_rtree.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/geometry/algorithms/detail/distance/geometry_to_geometry_rtree.hpp b/include/boost/geometry/algorithms/detail/distance/geometry_to_geometry_rtree.hpp index 24df29836..8dcbddddc 100644 --- a/include/boost/geometry/algorithms/detail/distance/geometry_to_geometry_rtree.hpp +++ b/include/boost/geometry/algorithms/detail/distance/geometry_to_geometry_rtree.hpp @@ -94,6 +94,12 @@ private: m_r_tree.query(index::nearest(query_geometry, 1), &t_v); BOOST_ASSERT( n > 0 ); + // n above is unused outside BOOST_ASSERT, hence the call + // to boost::ignore_unused below + // + // however, t_v (initialized by the call to m_r_tree.query(...)) + // is used below, which is why we cannot put the call to + // m_r_tree.query(...) inside BOOST_ASSERT boost::ignore_unused(n); comparable_return_type cd = dispatch::distance