From f7cfb6a259d77123f39f61d4e8f3ba6a0bfd3ec6 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Wed, 2 Jul 2014 23:28:03 +0300 Subject: [PATCH] [strategies][comparable distance] implement the class comparable_distance_result --- .../strategies/comparable_distance_result.hpp | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 include/boost/geometry/strategies/comparable_distance_result.hpp diff --git a/include/boost/geometry/strategies/comparable_distance_result.hpp b/include/boost/geometry/strategies/comparable_distance_result.hpp new file mode 100644 index 000000000..cfe7ea84a --- /dev/null +++ b/include/boost/geometry/strategies/comparable_distance_result.hpp @@ -0,0 +1,63 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2014, Oracle and/or its affiliates. + +// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle + +// Licensed under the Boost Software License version 1.0. +// http://www.boost.org/users/license.html + +#ifndef BOOST_GEOMETRY_STRATEGIES_COMPARABLE_DISTANCE_RESULT_HPP +#define BOOST_GEOMETRY_STRATEGIES_COMPARABLE_DISTANCE_RESULT_HPP + +#include +#include + +#include + + +namespace boost { namespace geometry +{ + +/*! +\brief Meta-function defining return type of comparable_distance function +\ingroup distance +*/ +template +< + typename Geometry1, + typename Geometry2 = Geometry1, + typename Strategy = void +> +struct comparable_distance_result +{ + typedef typename strategy::distance::services::return_type + < + typename strategy::distance::services::comparable_type + < + Strategy + >::type, + typename point_type::type, + typename point_type::type + >::type type; +}; + + +template +struct comparable_distance_result + : comparable_distance_result + < + Geometry1, + Geometry2, + typename detail::distance::default_strategy + < + Geometry1, Geometry2 + >::type + > +{}; + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_STRATEGIES_COMPARABLE_DISTANCE_RESULT_HPP