FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
utils::range< T > Class Template Reference

Iterable class that can embed arrays or initializer lists through implicit conversion. More...

#include <fastarduino/iterator.h>

Detailed Description

template<typename T>
class utils::range< T >

Iterable class that can embed arrays or initializer lists through implicit conversion.

The following samples show an example of function using a range parameter, and an example of how to call this function.

int sum(utils::range<int> numbers) {
int total = 0;
for (int num: numbers) total += num;
return num;
}
...
// Call sum()
int x = sum({1,2,3,4,5});
const int array[] = {10,20,30,40,50,60};
int y = sum(array);
Iterable class that can embed arrays or initializer lists through implicit conversion.
Definition: iterator.h:51
Template Parameters
Ttype of items in this range

Definition at line 50 of file iterator.h.


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