ned14 / outcome

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

custom domain status-code example doesn't build with boost #213

Closed hazelnusse closed 4 years ago

hazelnusse commented 4 years ago

I suspect this is just an issue where the status-code copy-pasta in outcome hasn't been updated properly, though perhaps I'm missing something else.

From this page: https://www.boost.org/doc/libs/1_72_0/libs/outcome/doc/html/experimental/worked-example/preamble.html

There is a link to https://github.com/ned14/status-code/blob/master/doc/custom_domain_worked_example.md

Which has a link to a Wandbox example: https://wandbox.org/permlink/aZJ4vaEPWShqrc44

If I modify this example to have: #include "boost/outcome/experimental/status-code/system_error2.hpp" and using namespace BOOST_OUTCOME_SYSTEM_ERROR2_NAMESPACE;

I get a number of compilation errors, see the wandbox output here: https://wandbox.org/permlink/aZJ4vaEPWShqrc44

ned14 commented 4 years ago

What's happened is that the wandbox link from https://github.com/ned14/status-code/blob/master/doc/custom_domain_worked_example.md has not been updated to match the documentation page. I've fixed that.

I've changed the code at your wandbox link to match current status_code, and now it works fine: https://wandbox.org/permlink/hIULrsRsrDyXq0vp

hazelnusse commented 4 years ago

Thanks @ned14 !