| 112 | } |
| 113 | |
| 114 | co_context::generator<const X &> const_lvalue_example() { |
| 115 | co_yield X{1}; // OK |
| 116 | const X x{2}; |
| 117 | co_yield x; // OK |
| 118 | co_yield std::move(x); // OK: same as above |
| 119 | } |
| 120 | |
| 121 | co_context::generator<X &> lvalue_example() { |
| 122 | // co_yield X{1}; // ill-formed: prvalue -> non-const lvalue |