]> git.proxmox.com Git - ceph.git/blame - 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
CommitLineData
7c673cae
FG
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
1e59de90
TL
7// This file was modified by Oracle on 2017-2021.
8// Modifications copyright (c) 2017-2021 Oracle and/or its affiliates.
b32b8144
FG
9// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10
7c673cae
FG
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
20effc67
TL
22#include <boost/range/begin.hpp>
23#include <boost/range/end.hpp>
7c673cae
FG
24
25
26namespace boost { namespace geometry
27{
28
29
30#ifndef DOXYGEN_NO_DETAIL
31namespace detail
32{
33
34
1e59de90 35template <typename Policy>
7c673cae
FG
36struct multi_modify
37{
1e59de90 38 template <typename MultiGeometry>
7c673cae
FG
39 static inline void apply(MultiGeometry& multi)
40 {
1e59de90
TL
41 auto const end = boost::end(multi);
42 for (auto it = boost::begin(multi); it != end; ++it)
7c673cae
FG
43 {
44 Policy::apply(*it);
45 }
46 }
b32b8144 47
1e59de90 48 template <typename MultiGeometry, typename Strategy>
b32b8144
FG
49 static inline void apply(MultiGeometry& multi, Strategy const& strategy)
50 {
1e59de90
TL
51 auto const end = boost::end(multi);
52 for (auto it = boost::begin(multi); it != end; ++it)
b32b8144
FG
53 {
54 Policy::apply(*it, strategy);
55 }
56 }
7c673cae
FG
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