From faab25232f54fb59a323de4b919ecb9b594bbff6 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Thu, 19 Jun 2014 17:07:37 +0300 Subject: [PATCH] [algorithms][detail] make sure we are not going to get an unused variable warning (on MSVC) --- .../geometry/algorithms/detail/check_iterator_range.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/geometry/algorithms/detail/check_iterator_range.hpp b/include/boost/geometry/algorithms/detail/check_iterator_range.hpp index 19f1b3f45..04355b7f5 100644 --- a/include/boost/geometry/algorithms/detail/check_iterator_range.hpp +++ b/include/boost/geometry/algorithms/detail/check_iterator_range.hpp @@ -10,6 +10,8 @@ #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_CHECK_ITERATOR_RANGE_HPP #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_CHECK_ITERATOR_RANGE_HPP +#include + namespace boost { namespace geometry { @@ -46,6 +48,10 @@ struct check_iterator_range InputIterator beyond, Predicate const& predicate) { + // in case predicate's apply method is static, MSVC will + // complain that predicate is not used + boost::ignore_unused(predicate); + for (InputIterator it = first; it != beyond; ++it) { if ( !predicate.apply(*it) )