[algorithms][detail] make sure we are not going to get an unused

variable warning (on MSVC)
This commit is contained in:
Menelaos Karavelas
2014-06-19 17:07:37 +03:00
parent 46ae61138a
commit faab25232f

View File

@@ -10,6 +10,8 @@
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_CHECK_ITERATOR_RANGE_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_CHECK_ITERATOR_RANGE_HPP
#include <boost/core/ignore_unused.hpp>
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) )