]> git.sesse.net Git - casparcg/blob - dependencies/boost/boost/geometry/strategies/default_distance_result.hpp
Manually merged pull request #222
[casparcg] / dependencies / boost / boost / geometry / strategies / default_distance_result.hpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2
3 // Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
5 // Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
6
7 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
8 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
9
10 // Use, modification and distribution is subject to the Boost Software License,
11 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
12 // http://www.boost.org/LICENSE_1_0.txt)
13
14 #ifndef BOOST_GEOMETRY_STRATEGIES_DEFAULT_DISTANCE_RESULT_HPP
15 #define BOOST_GEOMETRY_STRATEGIES_DEFAULT_DISTANCE_RESULT_HPP
16
17
18 #include <boost/geometry/core/cs.hpp>
19 #include <boost/geometry/core/point_type.hpp>
20 #include <boost/geometry/strategies/distance.hpp>
21
22
23 namespace boost { namespace geometry
24 {
25
26 /*!
27 \brief Meta-function defining return type of distance function
28 \ingroup distance
29 \note The strategy defines the return-type (so this situation is different
30     from length, where distance is sqr/sqrt, but length always squared)
31  */
32 template <typename Geometry1, typename Geometry2 = Geometry1>
33 struct default_distance_result
34 {
35     typedef typename strategy::distance::services::return_type
36         <
37             typename strategy::distance::services::default_strategy
38                 <
39                     point_tag,
40                     typename point_type<Geometry1>::type,
41                     typename point_type<Geometry2>::type
42                 >::type
43         >::type type;
44 };
45
46
47 }} // namespace boost::geometry
48
49
50 #endif // BOOST_GEOMETRY_STRATEGIES_DEFAULT_DISTANCE_RESULT_HPP