Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:30:50

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
0004 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
0005 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
0006 // Copyright (c) 2024 Adam Wulkiewicz, Lodz, Poland.
0007 
0008 // This file was modified by Oracle on 2020.
0009 // Modifications copyright (c) 2020, Oracle and/or its affiliates.
0010 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0011 
0012 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
0013 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
0014 
0015 // Use, modification and distribution is subject to the Boost Software License,
0016 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0017 // http://www.boost.org/LICENSE_1_0.txt)
0018 
0019 
0020 #ifndef BOOST_GEOMETRY_CORE_REVERSE_DISPATCH_HPP
0021 #define BOOST_GEOMETRY_CORE_REVERSE_DISPATCH_HPP
0022 
0023 
0024 #include <cstddef>
0025 #include <type_traits>
0026 
0027 #include <boost/geometry/core/geometry_id.hpp>
0028 
0029 
0030 namespace boost { namespace geometry
0031 {
0032 
0033 
0034 #ifndef DOXYGEN_NO_DETAIL
0035 namespace detail
0036 {
0037 
0038 // Different geometries: reverse_dispatch if second ID < first ID
0039 template <std::size_t GeometryId1, std::size_t GeometryId2>
0040 struct reverse_dispatch
0041     : std::integral_constant
0042         <
0043             bool,
0044             (GeometryId1 > GeometryId2)
0045         >
0046 {};
0047 
0048 
0049 // Same geometry: never reverse_dispatch
0050 template <std::size_t GeometryId>
0051 struct reverse_dispatch<GeometryId, GeometryId> : std::false_type {};
0052 
0053 
0054 } // namespace detail
0055 #endif // DOXYGEN_NO_DETAIL
0056 
0057 
0058 template <typename Geometry1, typename Geometry2>
0059 struct reverse_dispatch : detail::reverse_dispatch
0060     <
0061         geometry_id<Geometry1>::value,
0062         geometry_id<Geometry2>::value
0063     >
0064 {};
0065 
0066 
0067 }} // namespace boost::geometry
0068 
0069 #endif // BOOST_GEOMETRY_CORE_REVERSE_DISPATCH_HPP