]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/geometry/algorithms/detail/multi_modify.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / algorithms / detail / multi_modify.hpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
5 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
6
7 // This file was modified by Oracle on 2017-2021.
8 // Modifications copyright (c) 2017-2021 Oracle and/or its affiliates.
9 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10
11 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
12 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
13
14 // Use, modification and distribution is subject to the Boost Software License,
15 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
16 // http://www.boost.org/LICENSE_1_0.txt)
17
18 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_MULTI_MODIFY_HPP
19 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_MULTI_MODIFY_HPP
20
21
22 #include <boost/range/begin.hpp>
23 #include <boost/range/end.hpp>
24
25
26 namespace boost { namespace geometry
27 {
28
29
30 #ifndef DOXYGEN_NO_DETAIL
31 namespace detail
32 {
33
34
35 template <typename Policy>
36 struct multi_modify
37 {
38 template <typename MultiGeometry>
39 static inline void apply(MultiGeometry& multi)
40 {
41 auto const end = boost::end(multi);
42 for (auto it = boost::begin(multi); it != end; ++it)
43 {
44 Policy::apply(*it);
45 }
46 }
47
48 template <typename MultiGeometry, typename Strategy>
49 static inline void apply(MultiGeometry& multi, Strategy const& strategy)
50 {
51 auto const end = boost::end(multi);
52 for (auto it = boost::begin(multi); it != end; ++it)
53 {
54 Policy::apply(*it, strategy);
55 }
56 }
57 };
58
59
60 } // namespace detail
61 #endif
62
63
64 }} // namespace boost::geometry
65
66
67 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_MULTI_MODIFY_HPP