Skip to content

Commit

Permalink
added experimental context support.
Browse files Browse the repository at this point in the history
  • Loading branch information
klemens-morgenstern committed Mar 12, 2024
1 parent f61014d commit 626afe7
Show file tree
Hide file tree
Showing 11 changed files with 460 additions and 72 deletions.
2 changes: 1 addition & 1 deletion include/boost/cobalt/detail/detached.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct detached_promise
{
}

std::suspend_never initial_suspend() {return {};}
std::suspend_never initial_suspend() noexcept {return {};}
std::suspend_never final_suspend() noexcept {return {};}

void return_void() {}
Expand Down
2 changes: 1 addition & 1 deletion include/boost/cobalt/detail/generator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ struct generator_promise
this->reset_cancellation_source(signal.slot());
}

std::suspend_never initial_suspend() {return {};}
std::suspend_never initial_suspend() noexcept {return {};}

struct final_awaitable
{
Expand Down
2 changes: 1 addition & 1 deletion include/boost/cobalt/detail/main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct main_promise : signal_helper,
return my_resource->deallocate(raw, size);
}
#endif
std::suspend_always initial_suspend() {return {};}
std::suspend_always initial_suspend() noexcept {return {};}

BOOST_COBALT_DECL
auto final_suspend() noexcept -> std::suspend_never;
Expand Down
2 changes: 1 addition & 1 deletion include/boost/cobalt/detail/promise.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ struct cobalt_promise
this->reset_cancellation_source(signal.slot());
}

std::suspend_never initial_suspend() {return {};}
std::suspend_never initial_suspend() noexcept {return {};}
auto final_suspend() noexcept
{
return final_awaitable{this};
Expand Down
2 changes: 1 addition & 1 deletion include/boost/cobalt/detail/task.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ struct task_promise
}
};

auto initial_suspend()
auto initial_suspend() noexcept
{

return initial_awaitable{this};
Expand Down
2 changes: 1 addition & 1 deletion include/boost/cobalt/detail/with.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct with_impl<T>::promise_type
e = std::current_exception();
}

std::suspend_always initial_suspend() {return {};}
std::suspend_always initial_suspend() noexcept {return {};}

struct final_awaitable
{
Expand Down
Loading

0 comments on commit 626afe7

Please sign in to comment.