You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
non_value_result API should not be defined in terms of exception_wrapper
Summary:
The prior iteration of `non_value_result` and `result<T>` copiously leaked the fact that we use `exception_wrapper` as the implementation of `non_value_result`.
This turned out to be very undesirable for my future RTTI-avoidance work.
This diff improves usability, since `non_value_result{YourError{}}` is clearer and shorter than `make_exception_wrapper<YourError>()`.
At the same time, it practically eliminates usage of bare `exception_wrapper` in the `result` API. Only the explicitly-for-compatibility shims of `non_value_result::from_exception_wrapper`, and `non_value_result::to_exception_wrapper()` remain.
This makes it easy to drop in support for immortal exception pointers down the line.
Reviewed By: ispeters
Differential Revision: D73410513
fbshipit-source-id: db619bd115230247a4d45fc6f6b9130a1a108278
0 commit comments