This commit is contained in:
2023-04-03 08:09:47 -07:00
parent 9b4c881903
commit f18d9043a9
3 changed files with 185 additions and 1 deletions

View File

@@ -58,7 +58,7 @@ public:
~Generator() { if (h_) h_.destroy(); }
std::optional<T> operator()()
{
h_();
h_.resume();
if (h_.promise().exception_) {
std::rethrow_exception(h_.promise().exception_);
}