diff --git a/include/boost/geometry/algorithms/detail/is_valid/multi_range.hpp b/include/boost/geometry/algorithms/detail/is_valid/multi_linestring.hpp similarity index 55% rename from include/boost/geometry/algorithms/detail/is_valid/multi_range.hpp rename to include/boost/geometry/algorithms/detail/is_valid/multi_linestring.hpp index c8bad652f..18adbd481 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/multi_range.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/multi_linestring.hpp @@ -7,13 +7,14 @@ // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html -#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_MULTI_RANGE_HPP -#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_MULTI_RANGE_HPP +#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_MULTI_LINESTRING_HPP +#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_MULTI_LINESTRING_HPP #include -#include +#include +#include #include @@ -21,32 +22,6 @@ namespace boost { namespace geometry { -#ifndef DOXYGEN_NO_DETAIL -namespace detail { namespace is_valid -{ -template -struct is_valid_multi_range -{ - template - static inline bool apply(RangeIterator first, RangeIterator beyond) - { - for (RangeIterator it = first; it != beyond; ++it) - { - if ( !dispatch::is_valid::apply(*it) ) - { - return false; - } - } - return first != beyond; - }; -}; - - -}} //namespace detail::is_valid -#endif // DOXYGEN_NO_DETAIL - - - #ifndef DOXYGEN_NO_DISPATCH namespace dispatch { @@ -63,9 +38,12 @@ struct is_valid { static inline bool apply(MultiLinestring const& multilinestring) { - return detail::is_valid::is_valid_multi_range + return detail::check_iterator_range < - typename boost::range_value::type + dispatch::is_valid + < + typename boost::range_value::type + > >::apply(boost::begin(multilinestring), boost::end(multilinestring)); } @@ -79,4 +57,4 @@ struct is_valid }} // namespace boost::geometry -#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_MULTI_RANGE_HPP +#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_MULTI_LINESTRING_HPP