Debian Codegraph @

yo/coroutines/demo/corodir/recursiveiterator.h

raw
1 template <typename T, typename Promise>
2 class RecGenIterator
3 {
4 Promise *d_promise = 0;
5
6 public:
7 using Reference = std::conditional_t<std::is_reference_v<T>, T, T &>;
8
9 RecGenIterator() noexcept = default;
10
11 explicit RecGenIterator(Promise *promise) noexcept;
12
13 bool operator==(RecGenIterator const &other) const noexcept;
14
15 bool operator!=(RecGenIterator const &other) const noexcept;
16
17 RecGenIterator &operator++();
18
19 void operator++(int);
20
21 Reference operator*() const noexcept;
22
23 T *operator->() const noexcept;
24 };