1 // Boost.Geometry (aka GGL, Generic Geometry Library) 2 3 // Copyright (c) 2015, Oracle and/or its affiliates. 4 5 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle 6 7 // Licensed under the Boost Software License version 1.0. 8 // http://www.boost.org/users/license.html 9 10 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_FAILURE_POLICY_HPP 11 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_FAILURE_POLICY_HPP 12 13 #include <boost/geometry/algorithms/validity_failure_type.hpp> 14 15 16 namespace boost { namespace geometry 17 { 18 19 20 #ifndef DOXYGEN_NO_DETAIL 21 namespace detail { namespace is_simple 22 { 23 24 25 struct simplicity_failure_policy 26 { 27 template <validity_failure_type Failure> applyboost::geometry::detail::is_simple::simplicity_failure_policy28 static inline bool apply() 29 { 30 return Failure == no_failure; 31 } 32 33 template <validity_failure_type Failure, typename Data> applyboost::geometry::detail::is_simple::simplicity_failure_policy34 static inline bool apply(Data const&) 35 { 36 return apply<Failure>(); 37 } 38 39 template <validity_failure_type Failure, typename Data1, typename Data2> applyboost::geometry::detail::is_simple::simplicity_failure_policy40 static inline bool apply(Data1 const&, Data2 const&) 41 { 42 return apply<Failure>(); 43 } 44 }; 45 46 47 }} // namespace detail::is_simple 48 #endif // DOXYGEN_NO_DETAIL 49 50 }} // namespace boost::geometry 51 52 53 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_FAILURE_POLICY_HPP 54