| 75 | |
| 76 | template <class _Error> |
| 77 | constexpr void set_error(_Error &&__err) noexcept |
| 78 | { |
| 79 | STDEXEC_TRY |
| 80 | { |
| 81 | auto __err_copy = static_cast<_Error &&>(__err); // make a copy of the error... |
| 82 | __state_->__cleanup(); // ... because this could potentially invalidate it. |
| 83 | STDEXEC::set_error(std::move(__state_->__rcvr_), std::move(__err_copy)); |
| 84 | } |
| 85 | STDEXEC_CATCH_ALL |
| 86 | { |
| 87 | if constexpr (!__nothrow_decay_copyable<_Error>) |