123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_BOX_BOX_HPP
- #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_BOX_BOX_HPP
- #include <cstddef>
- #include <boost/geometry/algorithms/dispatch/disjoint.hpp>
- #include <boost/geometry/strategies/detail.hpp>
- namespace boost { namespace geometry
- {
- #ifndef DOXYGEN_NO_DETAIL
- namespace detail { namespace disjoint
- {
- template
- <
- typename Box1, typename Box2, typename Strategy,
- std::enable_if_t<strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
- >
- inline bool disjoint_box_box(Box1 const& box1, Box2 const& box2, Strategy const& strategy)
- {
- typedef decltype(strategy.disjoint(box1, box2)) strategy_type;
- return strategy_type::apply(box1, box2);
- }
- template
- <
- typename Box1, typename Box2, typename Strategy,
- std::enable_if_t<! strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
- >
- inline bool disjoint_box_box(Box1 const& box1, Box2 const& box2, Strategy const& )
- {
- return Strategy::apply(box1, box2);
- }
- }}
- #endif
- #ifndef DOXYGEN_NO_DISPATCH
- namespace dispatch
- {
- template <typename Box1, typename Box2, std::size_t DimensionCount>
- struct disjoint<Box1, Box2, DimensionCount, box_tag, box_tag, false>
- {
- template <typename Strategy>
- static inline bool apply(Box1 const& box1, Box2 const& box2, Strategy const& strategy)
- {
- typedef decltype(strategy.disjoint(box1, box2)) strategy_type;
- return strategy_type::apply(box1, box2);
- }
- };
- }
- #endif
- }}
- #endif
|