Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:35:06

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
0004 // Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
0005 // Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
0006 // Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland
0007 
0008 // This file was modified by Oracle on 2013-2020.
0009 // Modifications copyright (c) 2013-2020, Oracle and/or its affiliates.
0010 
0011 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0012 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
0013 
0014 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
0015 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
0016 
0017 // Use, modification and distribution is subject to the Boost Software License,
0018 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0019 // http://www.boost.org/LICENSE_1_0.txt)
0020 
0021 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_EQUALS_POINT_POINT_HPP
0022 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_EQUALS_POINT_POINT_HPP
0023 
0024 
0025 #include <type_traits>
0026 
0027 #include <boost/geometry/strategies/detail.hpp>
0028 
0029 
0030 namespace boost { namespace geometry
0031 {
0032 
0033 #ifndef DOXYGEN_NO_DETAIL
0034 namespace detail { namespace equals
0035 {
0036 
0037 /*!
0038     \brief Internal utility function to detect of points are disjoint
0039     \note To avoid circular references
0040  */
0041 template
0042 <
0043     typename Point1, typename Point2, typename Strategy,
0044     std::enable_if_t<strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
0045 >
0046 inline bool equals_point_point(Point1 const& point1, Point2 const& point2,
0047                                Strategy const& strategy)
0048 {
0049     typedef decltype(strategy.relate(point1, point2)) strategy_type;
0050     return strategy_type::apply(point1, point2);
0051 }
0052 
0053 template
0054 <
0055     typename Point1, typename Point2, typename Strategy,
0056     std::enable_if_t<! strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
0057 >
0058 inline bool equals_point_point(Point1 const& point1, Point2 const& point2,
0059                                Strategy const& )
0060 {
0061     return Strategy::apply(point1, point2);
0062 }
0063 
0064 }} // namespace detail::equals
0065 #endif // DOXYGEN_NO_DETAIL
0066 
0067 }} // namespace boost::geometry
0068 
0069 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_EQUALS_POINT_POINT_HPP