]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/geometry/include/boost/geometry/policies/robustness/robust_type.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / include / boost / geometry / policies / robustness / robust_type.hpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2
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.
7
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)
11
12#ifndef BOOST_GEOMETRY_POLICIES_ROBUSTNESS_ROBUST_TYPE_HPP
13#define BOOST_GEOMETRY_POLICIES_ROBUSTNESS_ROBUST_TYPE_HPP
14
15
16#include <boost/config.hpp>
17#include <boost/type_traits/is_floating_point.hpp>
18
19
20namespace boost { namespace geometry
21{
22
23#ifndef DOXYGEN_NO_DETAIL
24
25namespace detail_dispatch
26{
27
28template <typename CoordinateType, typename IsFloatingPoint>
29struct robust_type
30{
31};
32
33template <typename CoordinateType>
34struct robust_type<CoordinateType, boost::false_type>
35{
36 typedef CoordinateType type;
37};
38
39template <typename CoordinateType>
40struct robust_type<CoordinateType, boost::true_type>
41{
42 typedef boost::long_long_type type;
43};
44
45} // namespace detail_dispatch
46
47namespace detail
48{
49
50template <typename CoordinateType>
51struct robust_type
52{
53 typedef typename detail_dispatch::robust_type
54 <
55 CoordinateType,
56 typename boost::is_floating_point<CoordinateType>::type
57 >::type type;
58};
59
60} // namespace detail
61#endif // DOXYGEN_NO_DETAIL
62
63
64}} // namespace boost::geometry
65
66
67#endif // BOOST_GEOMETRY_POLICIES_ROBUSTNESS_ROBUST_TYPE_HPP