ned14 / outcome

Provides very lightweight outcome<T> and result<T> (non-Boost edition)
https://ned14.github.io/outcome
Other
675 stars 62 forks source link

Potentially outdated documentation #280

Closed jeromehue closed 11 months ago

jeromehue commented 11 months ago

Being new to error handling in C++, I tried to follow the example for the standalone single-header experimental library available at https://ned14.github.io/outcome/experimental/worked-example/.

However, the code snippet from this page : https://ned14.github.io/outcome/experimental/worked-example/implicit_conversion/ :

inline outcome_e::system_code make_status_code(file_io_error v)
{
  return make_status_code_ptr(std::move(v));
}

is not compiling, since make_status_code_ptr() has been removed from the library. From what I understand, it has been replaced by some make_nested_status_code() function in the status_code repo, but that is not included in the single-header version.

So what will be an equivalent of this example that works with the current version of the library ?

ned14 commented 11 months ago

Indeed you're right. Sorry about that.

ned14 commented 11 months ago

Fixed, with correct docs now at https://ned14.github.io/outcome/experimental/worked-example/implicit_conversion/.

Thanks for reporting this issue, I don't know why the CI didn't spot it.