Header file range/v3/numeric/partial_sum.hpp

#include <meta/meta.hpp>

#include <range/v3/begin_end.hpp>

#include <range/v3/range_traits.hpp>

#include <range/v3/range_concepts.hpp>

#include <range/v3/utility/functional.hpp>

#include <range/v3/utility/iterator_traits.hpp>

#include <range/v3/utility/iterator_concepts.hpp>

#include <range/v3/utility/static_const.hpp>

namespace ranges
{
    inline namespace v3
    {
        template <typename I, typename O, typename BOp = plus, typename P = ident, typename V = iterator_value_t<I>, typename X = concepts::Callable::result_t<P, V>, typename Y = concepts::Callable::result_t<BOp, X, X>>
        using PartialSummable = meta::strict_and<InputIterator<I>, OutputIterator<O, X&&>, Callable<P, V>, CopyConstructible<uncvref_t<X>>, Callable<BOp, X, X>, Assignable<uncvref_t<X>&, Y>>;
        
        struct partial_sum_fn
        {
            template <typename I, typename S, typename O, typename BOp = plus, typename P = ident, int _concept_requires_46 = 42, typename std::enable_if<(_concept_requires_46==43)||(Sentinel<S, I>()&&PartialSummable<I, O, BOp, P>()), int>::type=0>
            std::pair<I, O> operator()(I begin, S end, O result, BOp bop_ = BOp{}, P proj_ = P{}) const;
            
            template <typename I, typename S, typename O, typename S2, typename BOp = plus, typename P = ident, int _concept_requires_74 = 42, typename std::enable_if<(_concept_requires_74==43)||(Sentinel<S, I>()&&Sentinel<S2, O>()&&PartialSummable<I, O, BOp, P>()), int>::type=0>
            std::pair<I, O> operator()(I begin, S end, O result, S2 end_result, BOp bop_ = BOp{}, P proj_ = P{}) const;
            
            template <typename Rng, typename ORef, typename BOp = plus, typename P = ident, typename I = range_iterator_t<Rng>, typename O = uncvref_t<ORef>, int _concept_requires_104 = 42, typename std::enable_if<(_concept_requires_104==43)||(Range<Rng&>()&&PartialSummable<I, O, BOp, P>()), int>::type=0>
            std::pair<I, O> operator()(Rng& rng, ORef&& result, BOp bop = BOp{}, P proj = P{}) const;
            
            template <typename Rng, typename ORng, typename BOp = plus, typename P = ident, typename I = range_iterator_t<Rng>, typename O = range_iterator_t<ORng>, int _concept_requires_116 = 42, typename std::enable_if<(_concept_requires_116==43)||(Range<Rng&>()&&Range<ORng&>()&&PartialSummable<I, O, BOp, P>()), int>::type=0>
            std::pair<I, O> operator()(Rng& rng, ORng& result, BOp bop = BOp{}, P proj = P{}) const;
        };
        
        inline namespace 
        {
            constexpr auto& partial_sum = static_const<partial_sum_fn>::value;
        }
    }
}