On 31/03/2025 06:50, Pavel Vazharov wrote:
  1. std::exception_ptr supported references (including rvalue references) for the value type,
  2. std::exception_ptr::value() called std::rethrow_exception(error()) rather than throwing a std::bad_expected_access on error, and
  3. std::exception_ptr<T, std::exception_ptr>::transform(f) and ::and_then(f) were noexcept.  Completely noexcept is probably impossible, but it should be possible to wrap the transformation itself in try/catch, only throwing if the final copy/move of the returned result does so.
I believe you meant `std::expected` instead of std::exception_ptr in the above points? (Only the second template parameter in the third point should be std::exception_ptr).

Ah yes. Sorry.