1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2 
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
5 // Copyright (c) 2009-2012 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_AREA_RESULT_HPP
15 #define BOOST_GEOMETRY_STRATEGIES_DEFAULT_AREA_RESULT_HPP
16 
17 
18 #include <boost/geometry/core/cs.hpp>
19 #include <boost/geometry/core/coordinate_type.hpp>
20 #include <boost/geometry/strategies/area.hpp>
21 #include <boost/geometry/util/select_most_precise.hpp>
22 
23 
24 namespace boost { namespace geometry
25 {
26 
27 /*!
28 \brief Meta-function defining return type of area function, using the default strategy
29 \ingroup area
30 \note The strategy defines the return-type (so this situation is different
31     from length, where distance is sqr/sqrt, but length always squared)
32  */
33 
34 template <typename Geometry>
35 struct default_area_result
36 {
37     typedef typename point_type<Geometry>::type point_type;
38     typedef typename strategy::area::services::default_strategy
39         <
40             typename cs_tag<point_type>::type,
41             point_type
42         >::type strategy_type;
43 
44     typedef typename strategy_type::return_type type;
45 };
46 
47 
48 }} // namespace boost::geometry
49 
50 
51 #endif // BOOST_GEOMETRY_STRATEGIES_DEFAULT_AREA_RESULT_HPP
52