Console Library 8.0.0
A header-only library that makes C++ simple
Loading...
Searching...
No Matches
console::ops::sum_t Struct Reference

范围求和变换器。 More...

#include <gextra.h>

Public Member Functions

template<class Range>
auto operator() (Range r) const -> decltype(std::accumulate(r.begin(), r.end(), typename Range::value_type{}))
 计算范围中所有元素的和。

Detailed Description

范围求和变换器。

Member Function Documentation

◆ operator()()

template<class Range>
auto console::ops::sum_t::operator() ( Range r) const -> decltype(std::accumulate( r.begin(), r.end(), typename Range::value_type{}))
inline

计算范围中所有元素的和。

Parameters
r输入范围。
Returns
元素总和。

The documentation for this struct was generated from the following file: