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

ASIO recipe updates #195

Closed cstratopoulos closed 4 years ago

cstratopoulos commented 5 years ago

Hi again

I wanted to let you know I've recently updated the as_result.hpp ASIO recipe github gist: https://gist.github.com/cstratopoulos/901b5cdd41d07c6ce6d83798b09ecf9b

I've been having to revisit that code recently for a new project at work. The previous revision targeted Boost 1.69 when the coroutine stuff was still in asio::experimental. Taking a fresh look, it turns out I had the rug pulled out from under me in Boost 1.70. The bullet point about async_result and the one after it explains the issues. So in addition to updating the link to my gist, the friendly implementation and code snippets will need to be adjusted for the use of use_awaitable_t.

I apologize for this mixup--evidently it went undetected as I had not bumped the bundled boost version in code that was using that recipe.

Looking at https://github.com/ned14/outcome/issues/165 where we initially discussed this recipe, it seems that this stuff landed a matter of days/weeks after our discussion: https://github.com/boostorg/asio/commit/0568d3bf0b492887c6c48d05f5492a782dafa746 https://github.com/boostorg/asio/commit/baca9a092f93c6febc9b13c9d718c5311f21d9a9

In the future this may just be an issue of more closely tracking revisions to ASIO, or else building documentation snippets in CI which may be quite a bit of work.

ned14 commented 5 years ago

Fancy making a pull request?

cstratopoulos commented 5 years ago

Sure! Just had some extra stuff put on my plate though so I might need a few days if that's alright? (Assuming the PR would include updating the code snippet and doc section as well)