C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::async_noexcept

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Tue, 7 Nov 2023 11:40:10 +0000
On Tue, Nov 7, 2023 at 11:35 AM Frederick Virchanza Gotham wrote:
>
> catch(...)
> {
> std::promise<R> mypromise;
> std::future<R> myfuture = mypromise.get_future();
> mypromise.set_value(default_retval);
> return myfuture;
> }


Actually I might need to add a constraint here to ensure that
"set_value" won't throw an exception. The return type will need to
have a move/copy constructor declared as 'noexcept'.

Received on 2023-11-07 11:40:21