1#ifndef C6A6302D_1533_460C_84B8_A465FEABCAF6
2#define C6A6302D_1533_460C_84B8_A465FEABCAF6
38template<
typename Result>
63 iterator() noexcept : m_op(
nullptr) {}
78 ~iterator() =
default;
163 [](iterator* self) ->
eager_task { self->m_it =
co_await self->m_op; }(
this);
235template<
typename Result>
An input iterator that asynchronously produces values of type Result.
An asynchronous generator that produces values of type Result.
Adapter for converting asynchronous generators to synchronous generators.
~sync_generator_adapter()=default
Destructor.
sync_generator_adapter(async_generator< Result > gen) noexcept
Class constructor.
sync_generator_adapter(sync_generator_adapter &&other) noexcept=default
Move constructor.
iterator begin()
Returns an iterator to the current item of the generator.
iterator end() noexcept
Returns a sentinel iterator that marks the end of the generator.
sync_generator_adapter(async_generator< Result >) -> sync_generator_adapter< Result >
Deduction guide for sync_generator_adapter.
Iterator for the synchronous generator adapter.
bool operator==(const iterator &other) const noexcept
Compares two iterators for equality.
iterator & operator=(const iterator &other) noexcept=default
Default copy assignment operator.
std::input_iterator_tag iterator_concept
The strongest iterator concept supported by the iterator.
async_generator< Result >::iterator::reference operator*() const
Dereferences the iterator to access the current element.
iterator & operator++()
Advances the iterator to the next element.
void operator++(int)
Advances the iterator to the next element.
iterator(const iterator &other) noexcept=default
Default copy constructor.
iterator(iterator &&other) noexcept=default
Default move constructor.
std::ptrdiff_t difference_type
Difference between the addresses of any two elements in the controlled sequence.
iterator & operator=(iterator &&other) noexcept=default
Default move assignment operator.