| Home | Libraries | People | FAQ | More

### Header <boost/algorithm/cxx17/reduce.hpp>

Combine the elements of a sequence into a single value.

Marshall Clow

    namespace boost {
      namespace algorithm {
        template<typename InputIterator, typename T, typename BinaryOperation>
          T reduce(InputIterator first, InputIterator last, T init,
                   BinaryOperation bOp);
        template<typename InputIterator, typename T>
          T reduce(InputIterator first, InputIterator last, T init);
        template<typename InputIterator>
          std::iterator_traits< InputIterator >::value_type
          reduce(InputIterator first, InputIterator last);
        template<typename Range>
          boost::range_value< Range >::type reduce(const Range & r);
        template<typename Range, typename T> T reduce(const Range & r, T init);
        template<typename Range, typename T, typename BinaryOperation>
          T reduce(const Range & r, T init, BinaryOperation bOp);
      }
    }