1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2014 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2014 Bruno Lalande, Paris, France.
5 // Copyright (c) 2014 Mateusz Loskot, London, UK.
6 // Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
8 // Use, modification and distribution is subject to the Boost Software License,
9 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
12 #ifndef BOOST_GEOMETRY_POLICIES_ROBUSTNESS_ROBUST_TYPE_HPP
13 #define BOOST_GEOMETRY_POLICIES_ROBUSTNESS_ROBUST_TYPE_HPP
16 #include <boost/config.hpp>
17 #include <boost/type_traits/is_floating_point.hpp>
20 namespace boost { namespace geometry
23 #ifndef DOXYGEN_NO_DETAIL
25 namespace detail_dispatch
28 template <typename CoordinateType, typename IsFloatingPoint>
33 template <typename CoordinateType>
34 struct robust_type<CoordinateType, boost::false_type>
36 typedef CoordinateType type;
39 template <typename CoordinateType>
40 struct robust_type<CoordinateType, boost::true_type>
42 typedef boost::long_long_type type;
45 } // namespace detail_dispatch
50 template <typename CoordinateType>
53 typedef typename detail_dispatch::robust_type
56 typename boost::is_floating_point<CoordinateType>::type
61 #endif // DOXYGEN_NO_DETAIL
64 }} // namespace boost::geometry
67 #endif // BOOST_GEOMETRY_POLICIES_ROBUSTNESS_ROBUST_TYPE_HPP