Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
result<int, E> with error code compatible custom E does not TRY into a result<int, std::error_code> function #210
ned14 added a commit that referenced this issue
Oct 10, 2019
…lly considered for compatible copy and move conversions for `basic_result<>`. This lets you construct a `basic_result<T, E>` into a `basic_result<T, error_code>`, where `E` is a custom type which has implemented the ADL discovered free function `error_code make_error_code(E)`, but is otherwise unrelated to `error_code`. The same availability applies for `exception_ptr` with `make_exception_ptr()` being the ADL discovered free function. `basic_outcome<>` has less support for this than `basic_result<>` in order to keep constructor count down, but it will accept via this mechanism conversions from `basic_result<>` and `failure_type<>`.