box.hpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. // Copyright (c) 2014-2015 Samuel Debionne, Grenoble, France.
  6. // This file was modified by Oracle on 2015-2020.
  7. // Modifications copyright (c) 2015-2020, Oracle and/or its affiliates.
  8. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
  9. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
  10. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  11. // Distributed under the Boost Software License, Version 1.0.
  12. // (See accompanying file LICENSE_1_0.txt or copy at
  13. // http://www.boost.org/LICENSE_1_0.txt)
  14. #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_BOX_HPP
  15. #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_BOX_HPP
  16. #include <boost/geometry/algorithms/dispatch/expand.hpp>
  17. #include <boost/geometry/core/tags.hpp>
  18. namespace boost { namespace geometry
  19. {
  20. #ifndef DOXYGEN_NO_DISPATCH
  21. namespace dispatch
  22. {
  23. // Box + box -> new box containing two input boxes
  24. template
  25. <
  26. typename BoxOut, typename BoxIn
  27. >
  28. struct expand
  29. <
  30. BoxOut, BoxIn,
  31. box_tag, box_tag
  32. >
  33. {
  34. template <typename Strategy>
  35. static inline void apply(BoxOut& box_out,
  36. BoxIn const& box_in,
  37. Strategy const& strategy)
  38. {
  39. // strategy.expand(box_out, box_in).apply(box_out, box_in);
  40. using strategy_t = decltype(strategy.expand(box_out, box_in));
  41. strategy_t::apply(box_out, box_in);
  42. }
  43. };
  44. } // namespace dispatch
  45. #endif // DOXYGEN_NO_DISPATCH
  46. }} // namespace boost::geometry
  47. #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_INDEXED_HPP