12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_MULTI_SUM_HPP
- #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_MULTI_SUM_HPP
- #include <boost/range/begin.hpp>
- #include <boost/range/end.hpp>
- namespace boost { namespace geometry
- {
- #ifndef DOXYGEN_NO_DETAIL
- namespace detail
- {
- struct multi_sum
- {
- template <typename ReturnType, typename Policy, typename MultiGeometry, typename Strategy>
- static inline ReturnType apply(MultiGeometry const& multi, Strategy const& strategy)
- {
- ReturnType sum = ReturnType();
- for (auto it = boost::begin(multi); it != boost::end(multi); ++it)
- {
- sum += Policy::apply(*it, strategy);
- }
- return sum;
- }
- };
- }
- #endif
- }}
- #endif
|