struct promise_type {
typedef coro::coroutine_handle<promise_type> HandleT;
coro::suspend_never initial_suspend() { return sn; }
- coro::suspend_always final_suspend() { return sa; }
+ coro::suspend_always final_suspend() noexcept { return sa; }
coro::suspend_never yield_value(int) { return sn; }
MyFuture get_return_object() {
MyFuture f(HandleT::from_promise(*this));
void unhandled_exception() {}
void return_void() {}
coro::suspend_never initial_suspend() { return {}; }
- coro::suspend_never final_suspend() { return {}; }
+ coro::suspend_never final_suspend() noexcept { return {}; }
MyCoro get_return_object() {
do_runtime_test();
return {};
return {};
}
suspend_never initial_suspend() { return {}; }
- suspend_never final_suspend() { return {}; }
+ suspend_never final_suspend() noexcept { return {}; }
void return_void() {}
static void unhandled_exception() {}
};
return coroutine_handle<promise_type>::from_promise(*this);
}
suspend_never initial_suspend() { return {}; }
- suspend_never final_suspend() { return {}; }
+ suspend_never final_suspend() noexcept { return {}; }
void return_void() {}
void unhandled_exception() {}
};
Data* data;
DataPtr get_return_object() { data = new Data{}; return {data}; }
suspend_never initial_suspend() { return {}; }
- suspend_never final_suspend() { return {}; }
+ suspend_never final_suspend() noexcept { return {}; }
void return_value(T v) { data->val = std::move(v); data->error = {};}
void unhandled_exception() {}
};
struct coro2 {
struct promise_type {
suspend_never initial_suspend() { return{}; }
- suspend_never final_suspend() { return{}; }
+ suspend_never final_suspend() noexcept { return{}; }
coro2 get_return_object() { return{}; }
void return_void() {}
Bug yield_value(int) { return {}; }
return {};
}
suspend_always initial_suspend() { return {}; }
- suspend_always final_suspend() { return {}; }
+ suspend_always final_suspend() noexcept { return {}; }
minig get_return_object() { return minig{this}; };
void return_void() {}
void unhandled_exception() {}
suspend_never initial_suspend() {
return {};
}
- suspend_never final_suspend() {
+ suspend_never final_suspend() noexcept {
return {};
}
void return_void() {}
return {};
}
std::experimental::suspend_always initial_suspend() { return {}; }
- std::experimental::suspend_always final_suspend() { return {}; }
+ std::experimental::suspend_always final_suspend() noexcept { return {}; }
generator get_return_object() { return generator{this}; };
void return_void() {}
void unhandled_exception() {}