| 86 | }; |
| 87 | |
| 88 | co_context::generator<X> always_ref_example() { |
| 89 | co_yield X{1}; |
| 90 | { |
| 91 | X x{2}; |
| 92 | co_yield x; |
| 93 | assert(x.id == 2); |
| 94 | } |
| 95 | { |
| 96 | const X x{3}; |
| 97 | co_yield x; |
| 98 | assert(x.id == 3); |
| 99 | } |
| 100 | { |
| 101 | X x{4}; |
| 102 | co_yield std::move(x); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | co_context::generator<X &&> xvalue_example() { |
| 107 | co_yield X{1}; |