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