Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

result<int, E> with error code compatible custom E does not TRY into a result<int, std::error_code> function #210

Closed
ned14 opened this issue Oct 10, 2019 · 1 comment
Labels
bug

Comments

@ned14
Copy link
Owner

@ned14 ned14 commented Oct 10, 2019

No description provided.

@ned14 ned14 added the bug label Oct 10, 2019
@ned14 ned14 changed the title Try isn't working when calling a `result<int>` function from a `result<unique_ptr<T>>` function result<T, E> with error code compatible custom E does not TRY into a result<unique_ptr, std::error_code> function Oct 10, 2019
@ned14 ned14 changed the title result<T, E> with error code compatible custom E does not TRY into a result<unique_ptr, std::error_code> function result<int, E> with error code compatible custom E does not TRY into a result<int, std::error_code> function Oct 10, 2019
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<>`.
@ned14

This comment has been minimized.

Copy link
Owner Author

@ned14 ned14 commented Nov 15, 2019

Fixed.

@ned14 ned14 closed this Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.