do_reverse.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
  3. // Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland
  4. // This file was modified by Oracle on 2020.
  5. // Modifications copyright (c) 2020 Oracle and/or its affiliates.
  6. // Contributed and/or modified by Adam Wulkiewicz, 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)
  10. #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DO_REVERSE_HPP
  11. #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DO_REVERSE_HPP
  12. #include <boost/geometry/core/point_order.hpp>
  13. namespace boost { namespace geometry
  14. {
  15. #ifndef DOXYGEN_NO_DETAIL
  16. namespace detail { namespace overlay
  17. {
  18. // Metafunction helper for intersection and union
  19. template <order_selector Selector, bool Reverse = false>
  20. struct do_reverse {};
  21. template <>
  22. struct do_reverse<clockwise, false> : std::false_type {};
  23. template <>
  24. struct do_reverse<clockwise, true> : std::true_type {};
  25. template <>
  26. struct do_reverse<counterclockwise, false> : std::true_type {};
  27. template <>
  28. struct do_reverse<counterclockwise, true> : std::false_type {};
  29. }} // namespace detail::overlay
  30. #endif // DOXYGEN_NO_DETAIL
  31. }} // namespace boost::geometry
  32. #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DO_REVERSE_HPP