3 // Copyright (c) 2015 Oracle and/or its affiliates.
5 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
7 // Use, modification and distribution is subject to the Boost Software License,
8 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
11 #ifndef BOOST_GEOMETRY_UTIL_HAS_INFINITE_COORDINATE_HPP
12 #define BOOST_GEOMETRY_UTIL_HAS_INFINITE_COORDINATE_HPP
14 #include <boost/type_traits/is_floating_point.hpp>
16 #include <boost/geometry/core/coordinate_type.hpp>
17 #include <boost/geometry/util/has_nan_coordinate.hpp>
18 #include <boost/math/special_functions/fpclassify.hpp>
20 namespace boost { namespace geometry
23 #ifndef DOXYGEN_NO_DETAIL
30 static inline bool apply(T const& t)
32 return boost::math::isinf(t);
37 #endif // DOXYGEN_NO_DETAIL
39 template <typename Point>
40 bool has_infinite_coordinate(Point const& point)
42 return detail::has_coordinate_with_property
46 boost::is_floating_point
48 typename coordinate_type<Point>::type
53 }} // namespace boost::geometry
55 #endif // BOOST_GEOMETRY_UTIL_HAS_INFINITE_COORDINATE_HPP