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;
span(IterB &&b, IterE &&e, Adaptor &&adaptor) -> span< decltype(adaptor(std::forward< IterB >(b))), decltype(adaptor(std::forward< IterE >(e))) >
std::vector< int > Data_t
auto make_span(BIter begin, EIter end)
Creates a span from specified iterators (can use constructor instead).
int sum(util::span< Data_t::iterator > r)
QTextStream & endl(QTextStream &s)
Definition at line 217 of file span_test.cc.
218 decltype(r)::value_type
s = 0;
219 for (
auto v: r)
s += v;
The documentation for this struct was generated from the following file: