Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2021, Oracle and/or its affiliates.
0004 
0005 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0006 
0007 // Licensed under the Boost Software License version 1.0.
0008 // http://www.boost.org/users/license.html
0009 
0010 #ifndef BOOST_GEOMETRY_ALGORITHS_DETAIL_DISTANCE_STRATEGY_UTILS_HPP
0011 #define BOOST_GEOMETRY_ALGORITHS_DETAIL_DISTANCE_STRATEGY_UTILS_HPP
0012 
0013 
0014 #include <utility>
0015 
0016 #include <boost/geometry/core/point_type.hpp>
0017 
0018 #include <boost/geometry/strategies/distance.hpp>
0019 
0020 
0021 namespace boost { namespace geometry
0022 {
0023 
0024 #ifndef DOXYGEN_NO_DETAIL
0025 namespace detail { namespace distance
0026 {
0027 
0028 
0029 template <typename Geometry1, typename Geometry2, typename Strategies>
0030 using strategy_t = decltype(
0031     std::declval<Strategies>().distance(std::declval<Geometry1>(), std::declval<Geometry2>()));
0032 
0033 
0034 template <typename Geometry1, typename Geometry2, typename Strategies>
0035 using return_t = typename strategy::distance::services::return_type
0036     <
0037         strategy_t<Geometry1, Geometry2, Strategies>,
0038         typename point_type<Geometry1>::type,
0039         typename point_type<Geometry2>::type
0040     >::type;
0041 
0042 
0043 template <typename Geometry1, typename Geometry2, typename Strategies>
0044 using cstrategy_t = typename strategy::distance::services::comparable_type
0045     <
0046         strategy_t<Geometry1, Geometry2, Strategies>
0047     >::type;
0048 
0049 
0050 template <typename Geometry1, typename Geometry2, typename Strategies>
0051 using creturn_t = typename strategy::distance::services::return_type
0052     <
0053         cstrategy_t<Geometry1, Geometry2, Strategies>,
0054         typename point_type<Geometry1>::type,
0055         typename point_type<Geometry2>::type
0056     >::type;
0057 
0058 
0059 }} // namespace detail::distance
0060 #endif // DOXYGEN_NO_DETAIL
0061 
0062 }} // namespace boost::geometry
0063 
0064 #endif // BOOST_GEOMETRY_ALGORITHS_DETAIL_DISTANCE_STRATEGY_UTILS_HPP