Chris@16: // Boost.Geometry (aka GGL, Generic Geometry Library) Chris@16: Chris@101: // Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands. Chris@101: // Copyright (c) 2008-2014 Bruno Lalande, Paris, France. Chris@101: // Copyright (c) 2009-2014 Mateusz Loskot, London, UK. Chris@101: Chris@101: // This file was modified by Oracle on 2014. Chris@101: // Modifications copyright (c) 2014, Oracle and/or its affiliates. Chris@101: Chris@101: // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle Chris@16: Chris@16: // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library Chris@16: // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. Chris@16: Chris@16: // Use, modification and distribution is subject to the Boost Software License, Chris@16: // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: #ifndef BOOST_GEOMETRY_STRATEGIES_DEFAULT_LENGTH_RESULT_HPP Chris@16: #define BOOST_GEOMETRY_STRATEGIES_DEFAULT_LENGTH_RESULT_HPP Chris@16: Chris@101: #include Chris@16: Chris@16: #include Chris@101: Chris@101: #include Chris@16: #include Chris@101: #include Chris@16: Chris@16: Chris@16: namespace boost { namespace geometry Chris@16: { Chris@16: Chris@101: Chris@101: namespace resolve_strategy Chris@101: { Chris@101: Chris@101: template Chris@101: struct default_length_result Chris@101: { Chris@101: typedef typename select_most_precise Chris@101: < Chris@101: typename coordinate_type::type, Chris@101: long double Chris@101: >::type type; Chris@101: }; Chris@101: Chris@101: } // namespace resolve_strategy Chris@101: Chris@101: Chris@101: namespace resolve_variant Chris@101: { Chris@101: Chris@101: template Chris@101: struct default_length_result Chris@101: : resolve_strategy::default_length_result Chris@101: {}; Chris@101: Chris@101: template Chris@101: struct default_length_result > Chris@101: { Chris@101: typedef typename compress_variant< Chris@101: typename transform_variant< Chris@101: boost::variant, Chris@101: resolve_strategy::default_length_result Chris@101: >::type Chris@101: >::type type; Chris@101: }; Chris@101: Chris@101: } // namespace resolve_variant Chris@101: Chris@101: Chris@16: /*! Chris@16: \brief Meta-function defining return type of length function Chris@16: \ingroup length Chris@16: \note Length of a line of integer coordinates can be double. Chris@16: So we take at least a double. If Big Number types are used, Chris@16: we take that type. Chris@16: Chris@16: */ Chris@16: template Chris@16: struct default_length_result Chris@101: : resolve_variant::default_length_result Chris@101: {}; Chris@101: Chris@16: Chris@16: }} // namespace boost::geometry Chris@16: Chris@16: #endif // BOOST_GEOMETRY_STRATEGIES_DEFAULT_LENGTH_RESULT_HPP