// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands. // This file was modified by Oracle on 2014. // Modifications copyright (c) 2014, Oracle and/or its affiliates. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_LESS_HPP #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_LESS_HPP namespace boost { namespace geometry { #ifndef DOXYGEN_NO_DISPATCH namespace detail_dispatch { namespace relate { // TODO: Integrate it with geometry::less? template ::value> struct less { static inline bool apply(Point1 const& left, Point2 const& right) { typename geometry::coordinate_type::type cleft = geometry::get(left); typename geometry::coordinate_type::type cright = geometry::get(right); if ( geometry::math::equals(cleft, cright) ) { return less::apply(left, right); } else { return cleft < cright; } } }; template struct less { static inline bool apply(Point1 const&, Point2 const&) { return false; } }; }} // namespace detail_dispatch::relate #endif #ifndef DOXYGEN_NO_DETAIL namespace detail { namespace relate { struct less { template inline bool operator()(Point1 const& point1, Point2 const& point2) const { return detail_dispatch::relate::less::apply(point1, point2); } }; }} // namespace detail::relate #endif // DOXYGEN_NO_DETAIL }} // namespace boost::geometry #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_LESS_HPP