17 template <
class T,
size_t N>
45 constexpr
bool hasNext()
const override{
return this->index < N; }
49 return payload_type::withoutValue();
51 const auto& value = this->arr[this->
index];
54 return payload_type::withValue(value);
70 template <
class T,
size_t N>
74 make::ptr<details::FromArrayIterator<T, N>>(std::move(a))
constexpr FromArrayIterator(std::array< T, N > arr)
Construct from a std::array.
constexpr bool hasNext() const override
Determines whether or not this iterator can produce another value payload.
StreamIteratorPayload< T > payload_type
Type alias for the payload used.
typename payload_type::value_type value_type
Type alias for the data type manipulated.
Global namespace of the SCL.
size_t index
The next index to get data from.
std::array< T, N > arr
The underlying array.
typename iterator_type::value_type value_type
A class for iterators that start a stream chain.
Stream< T > streamFrom(std::array< T, N > a)
Create an scl::stream::Stream from a std::array.
typename iterator_type::payload_type payload_type
Class representing a stream of data.
payload_type next() override
Retrieve the next iterator payload.