diff options
Diffstat (limited to 'boost/geometry/multi/algorithms/detail/multi_sum.hpp')
-rw-r--r-- | boost/geometry/multi/algorithms/detail/multi_sum.hpp | 53 |
1 files changed, 8 insertions, 45 deletions
diff --git a/boost/geometry/multi/algorithms/detail/multi_sum.hpp b/boost/geometry/multi/algorithms/detail/multi_sum.hpp index a47685ceb1..b91970a164 100644 --- a/boost/geometry/multi/algorithms/detail/multi_sum.hpp +++ b/boost/geometry/multi/algorithms/detail/multi_sum.hpp @@ -11,48 +11,11 @@ // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_GEOMETRY_MULTI_SUM_HPP -#define BOOST_GEOMETRY_MULTI_SUM_HPP - -#include <boost/range.hpp> - - -namespace boost { namespace geometry -{ -#ifndef DOXYGEN_NO_DETAIL -namespace detail -{ - -template -< - typename ReturnType, - typename MultiGeometry, - typename Strategy, - typename Policy -> -struct multi_sum -{ - static inline ReturnType apply(MultiGeometry const& geometry, Strategy const& strategy) - { - ReturnType sum = ReturnType(); - for (typename boost::range_iterator - < - MultiGeometry const - >::type it = boost::begin(geometry); - it != boost::end(geometry); - ++it) - { - sum += Policy::apply(*it, strategy); - } - return sum; - } -}; - - -} // namespace detail -#endif - -}} // namespace boost::geometry - - -#endif // BOOST_GEOMETRY_MULTI_SUM_HPP +#ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_MULTI_SUM_HPP +#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_MULTI_SUM_HPP + + +#include <boost/geometry/algorithms/detail/multi_sum.hpp> + + +#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_MULTI_SUM_HPP |