1 // Boost.Geometry (aka GGL, Generic Geometry Library) 2 3 // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. 4 // Copyright (c) 2008-2015 Bruno Lalande, Paris, France. 5 // Copyright (c) 2009-2015 Mateusz Loskot, London, UK. 6 7 // This file was modified by Oracle on 2015, 2017. 8 // Modifications copyright (c) 2015-2017, Oracle and/or its affiliates. 9 10 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle 11 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle 12 13 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library 14 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. 15 16 // Use, modification and distribution is subject to the Boost Software License, 17 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 18 // http://www.boost.org/LICENSE_1_0.txt) 19 20 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_NOT_HPP 21 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_NOT_HPP 22 23 namespace boost { namespace geometry 24 { 25 26 #ifndef DOXYGEN_NO_DETAIL 27 namespace detail 28 { 29 30 31 32 /*! 33 \brief Structure negating the result of specified policy 34 \tparam Geometry1 \tparam_geometry 35 \tparam Geometry2 \tparam_geometry 36 \tparam Policy 37 \param geometry1 \param_geometry 38 \param geometry2 \param_geometry 39 \return Negation of the result of the policy 40 */ 41 template <typename Policy> 42 struct not_ 43 { 44 template <typename Geometry1, typename Geometry2> applyboost::geometry::detail::not_45 static inline bool apply(Geometry1 const& geometry1, 46 Geometry2 const& geometry2) 47 { 48 return ! Policy::apply(geometry1, geometry2); 49 } 50 51 template <typename Geometry1, typename Geometry2, typename Strategy> applyboost::geometry::detail::not_52 static inline bool apply(Geometry1 const& geometry1, 53 Geometry2 const& geometry2, 54 Strategy const& strategy) 55 { 56 return ! Policy::apply(geometry1, geometry2, strategy); 57 } 58 }; 59 60 61 } // namespace detail 62 #endif // DOXYGEN_NO_DETAIL 63 64 }} // namespace boost::geometry 65 66 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_NOT_HPP 67