Closed J-Roux closed 2 years ago
If you replace the problem std
items with boost
, it works. See https://godbolt.org/z/ensfo4jEY.
As to why boost::exception_ptr
won't accept a std::exception_ptr
, I CC in @zajo to see if he can tell us.
Thank you. But in this way docs are still incorrect.
Depends on your definition of "incorrect". Outcome has always been clear that it comes in standalone and Boost flavours, and the defaulted template parameters are the only thing which varies between the two. Most users of either understand this and adapt the examples appropriately.
I read this example in boost docs(https://www.boost.org/doc/libs/1_77_0/libs/outcome/doc/html/tutorial/essential/outcome.html). And I expected that example in boost docs are compilable. I think it is a common sense.
@zajo
Try with current develop. Note, you need both the throw_exception and exception repos.
Cool thanks Emil. I'm going to go ahead and close this now, but thanks for raising the issue.
https://github.com/boostorg/outcome/blob/master/doc/src/snippets/using_outcome.cpp
https://godbolt.org/z/K3qb1xKKj