|
using | Data_t = std::vector< int > |
|
Definition at line 214 of file span_test.cc.
void SpanDocumentation1TestClass::analyse |
( |
| ) |
|
|
inline |
Definition at line 223 of file span_test.cc.
226 std::iota(v.begin(), v.end(), 1);
228 auto span5 =
util::span(v.begin(), v.begin() + 5);
229 std::cout <<
"Sum of 5 numbers: " <<
sum(span5) << std::endl;
231 auto span8 =
util::span(v.begin(), v.begin() + 8);
232 std::cout <<
"Sum of 8 numbers: " <<
sum(span8) << std::endl;
235 std::cout <<
"Sum of all numbers: " <<
sum(full_span) << std::endl;
std::vector< int > Data_t
auto make_span(BIter begin, EIter end)
Creates a span from specified iterators (can use constructor instead).
Simple class with a begin and an end.
int sum(util::span< Data_t::iterator > r)
BEGIN_PROLOG could also be cout
int SpanDocumentation1TestClass::sum |
( |
util::span< Data_t::iterator > |
r | ) |
|
|
inline |
Definition at line 217 of file span_test.cc.
218 decltype(r)::value_type
s = 0;
219 for (
auto v: r)
s += v;
then echo File list $list not found else cat $list while read file do echo $file sed s
The documentation for this struct was generated from the following file: