annotate DEPENDENCIES/generic/include/boost/geometry/iterators/has_one_element.hpp @ 125:34e428693f5d vext

Vext -> Repoint
author Chris Cannam
date Thu, 14 Jun 2018 11:15:39 +0100
parents f46d142149f5
children
rev   line source
Chris@102 1 // Boost.Geometry (aka GGL, Generic Geometry Library)
Chris@102 2
Chris@102 3 // Copyright (c) 2014, Oracle and/or its affiliates.
Chris@102 4
Chris@102 5 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
Chris@102 6
Chris@102 7 // Licensed under the Boost Software License version 1.0.
Chris@102 8 // http://www.boost.org/users/license.html
Chris@102 9
Chris@102 10 #ifndef BOOST_GEOMETRY_ITERATORS_HAS_ONE_ELEMENT_HPP
Chris@102 11 #define BOOST_GEOMETRY_ITERATORS_HAS_ONE_ELEMENT_HPP
Chris@102 12
Chris@102 13
Chris@102 14 namespace boost { namespace geometry
Chris@102 15 {
Chris@102 16
Chris@102 17
Chris@102 18 // free function to test if an iterator range has a single element
Chris@102 19 template <typename Iterator>
Chris@102 20 inline bool has_one_element(Iterator first, Iterator beyond)
Chris@102 21 {
Chris@102 22 return first != beyond && ++first == beyond;
Chris@102 23 }
Chris@102 24
Chris@102 25
Chris@102 26 }} // namespace boost::geometry
Chris@102 27
Chris@102 28
Chris@102 29 #endif // BOOST_GEOMETRY_ITERATORS_HAS_ONE_ELEMENT_HPP