1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
5 // Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
6 // Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland
8 // This file was modified by Oracle on 2013-2020.
9 // Modifications copyright (c) 2013-2020, Oracle and/or its affiliates.
11 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
12 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
14 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
15 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
17 // Use, modification and distribution is subject to the Boost Software License,
18 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
19 // http://www.boost.org/LICENSE_1_0.txt)
21 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_EQUALS_POINT_POINT_HPP
22 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_EQUALS_POINT_POINT_HPP
25 #include <type_traits>
27 #include <boost/geometry/strategies/detail.hpp>
30 namespace boost { namespace geometry
33 #ifndef DOXYGEN_NO_DETAIL
34 namespace detail { namespace equals
38 \brief Internal utility function to detect of points are disjoint
39 \note To avoid circular references
43 typename Point1, typename Point2, typename Strategy,
44 std::enable_if_t<strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
46 inline bool equals_point_point(Point1 const& point1, Point2 const& point2,
47 Strategy const& strategy)
49 typedef decltype(strategy.relate(point1, point2)) strategy_type;
50 return strategy_type::apply(point1, point2);
55 typename Point1, typename Point2, typename Strategy,
56 std::enable_if_t<! strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
58 inline bool equals_point_point(Point1 const& point1, Point2 const& point2,
61 return Strategy::apply(point1, point2);
64 }} // namespace detail::equals
65 #endif // DOXYGEN_NO_DETAIL
67 }} // namespace boost::geometry
69 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_EQUALS_POINT_POINT_HPP