Header file range/v3/numeric/inner_product.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 I1, typename I2, typename T, typename BOp1 = plus, typename BOp2 = multiplies, typename P1 = ident, typename P2 = ident, typename V1 = iterator_value_t<I1>, typename V2 = iterator_value_t<I2>, typename X1 = concepts::Callable::result_t<P1, V1>, typename X2 = concepts::Callable::result_t<P2, V2>, typename Y2 = concepts::Callable::result_t<BOp2, X1, X2>, typename Y1 = concepts::Callable::result_t<BOp1, T, Y2>>
        using InnerProductable = meta::strict_and<InputIterator<I1>, InputIterator<I2>, Callable<P1, V1>, Callable<P2, V2>, Callable<BOp2, X1, X2>, Callable<BOp1, T, Y2>, Assignable<T&, Y2>>;
        
        struct inner_product_fn
        {
            template <typename I1, typename S1, typename I2, typename T, typename BOp1 = plus, typename BOp2 = multiplies, typename P1 = ident, typename P2 = ident, int _concept_requires_53 = 42, typename std::enable_if<(_concept_requires_53==43)||(Sentinel<S1, I1>()&&InnerProductable<I1, I2, T, BOp1, BOp2, P1, P2>()), int>::type=0>
            T operator()(I1 begin1, S1 end1, I2 begin2, T init, BOp1 bop1_ = BOp1{}, BOp2 bop2_ = BOp2{}, P1 proj1_ = P1{}, P2 proj2_ = P2{}) const;
            
            template <typename I1, typename S1, typename I2, typename S2, typename T, typename BOp1 = plus, typename BOp2 = multiplies, typename P1 = ident, typename P2 = ident, int _concept_requires_73 = 42, typename std::enable_if<(_concept_requires_73==43)||(Sentinel<S1, I1>()&&Sentinel<S2, I2>()&&InnerProductable<I1, I2, T, BOp1, BOp2, P1, P2>()), int>::type=0>
            T operator()(I1 begin1, S1 end1, I2 begin2, S2 end2, T init, BOp1 bop1_ = BOp1{}, BOp2 bop2_ = BOp2{}, P1 proj1_ = P1{}, P2 proj2_ = P2{}) const;
            
            template <typename Rng1, typename I2Ref, typename T, typename BOp1 = plus, typename BOp2 = multiplies, typename P1 = ident, typename P2 = ident, typename I1 = range_iterator_t<Rng1>, typename I2 = uncvref_t<I2Ref>, int _concept_requires_95 = 42, typename std::enable_if<(_concept_requires_95==43)||(Range<Rng1>()&&Iterator<I2>()&&InnerProductable<I1, I2, T, BOp1, BOp2, P1, P2>()), int>::type=0>
            T operator()(Rng1&& rng1, I2Ref&& begin2, T init, BOp1 bop1 = BOp1{}, BOp2 bop2 = BOp2{}, P1 proj1 = P1{}, P2 proj2 = P2{}) const;
            
            template <typename Rng1, typename Rng2, typename T, typename BOp1 = plus, typename BOp2 = multiplies, typename P1 = ident, typename P2 = ident, typename I1 = range_iterator_t<Rng1>, typename I2 = range_iterator_t<Rng2>, int _concept_requires_110 = 42, typename std::enable_if<(_concept_requires_110==43)||(Range<Rng1>()&&Range<Rng2>()&&InnerProductable<I1, I2, T, BOp1, BOp2, P1, P2>()), int>::type=0>
            T operator()(Rng1&& rng1, Rng2&& rng2, T init, BOp1 bop1 = BOp1{}, BOp2 bop2 = BOp2{}, P1 proj1 = P1{}, P2 proj2 = P2{}) const;
        };
        
        inline namespace 
        {
            constexpr auto& inner_product = static_const<with_braced_init_args<inner_product_fn>>::value;
        }
    }
}