point.hpp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
  3. // Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
  4. // Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
  5. // This file was modified by Oracle on 2015-2020.
  6. // Modifications copyright (c) 2015-2020, Oracle and/or its affiliates.
  7. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
  8. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
  9. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  10. // Distributed under the Boost Software License, Version 1.0.
  11. // (See accompanying file LICENSE_1_0.txt or copy at
  12. // http://www.boost.org/LICENSE_1_0.txt)
  13. #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_ENVELOPE_POINT_HPP
  14. #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_ENVELOPE_POINT_HPP
  15. #include <boost/geometry/core/tags.hpp>
  16. #include <boost/geometry/algorithms/dispatch/envelope.hpp>
  17. namespace boost { namespace geometry
  18. {
  19. #ifndef DOXYGEN_NO_DETAIL
  20. namespace detail { namespace envelope
  21. {
  22. struct envelope_point
  23. {
  24. template <typename Point, typename Box, typename Strategy>
  25. static inline void apply(Point const& point, Box& mbr, Strategy const& strategy)
  26. {
  27. // strategy.envelope(point, mbr).apply(point, mbr);
  28. using strategy_t = decltype(strategy.envelope(point, mbr));
  29. strategy_t::apply(point, mbr);
  30. }
  31. };
  32. }} // namespace detail::envelope
  33. #endif // DOXYGEN_NO_DETAIL
  34. #ifndef DOXYGEN_NO_DISPATCH
  35. namespace dispatch
  36. {
  37. template <typename Point>
  38. struct envelope<Point, point_tag>
  39. : detail::envelope::envelope_point
  40. {};
  41. } // namespace dispatch
  42. #endif // DOXYGEN_NO_DISPATCH
  43. }} // namespace boost::geometry
  44. #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_ENVELOPE_POINT_HPP