1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2015, Oracle and/or its affiliates.
5 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
10 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_FAILURE_POLICY_HPP
11 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_FAILURE_POLICY_HPP
13 #include <boost/geometry/algorithms/validity_failure_type.hpp>
16 namespace boost { namespace geometry
20 #ifndef DOXYGEN_NO_DETAIL
21 namespace detail { namespace is_simple
25 struct simplicity_failure_policy
27 template <validity_failure_type Failure>
28 static inline bool apply()
30 return Failure == no_failure;
33 template <validity_failure_type Failure, typename Data>
34 static inline bool apply(Data const&)
36 return apply<Failure>();
39 template <validity_failure_type Failure, typename Data1, typename Data2>
40 static inline bool apply(Data1 const&, Data2 const&)
42 return apply<Failure>();
47 }} // namespace detail::is_simple
48 #endif // DOXYGEN_NO_DETAIL
50 }} // namespace boost::geometry
53 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_FAILURE_POLICY_HPP