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

Fix Boost.System trait namespacing #206

Merged
merged 1 commit into from
Oct 2, 2019
Merged

Conversation

cstratopoulos
Copy link
Contributor

@cstratopoulos cstratopoulos commented Aug 13, 2019

I noticed that the outcome_throw_as_system_error_with_payload(BoostErrorCodeEnum &&) page refers to the trait class boost::system::errc::is_error_meow_enum<BoostErrorCodeEnum>. As per the Boost.System docs the trait is spelled boost::system::is_error_meow_enum (no errc namespace).

Happily this error does not appear to be reproduced anywhere in the actual code:

  • error_code_registration.cpp puts the specialization in boost::system
  • boost_result.hpp just opens the namespace boost::system::errc so that (if I follow) ADL allows calling outcome_throw_as_system_error_with_payload(boost::system::errc::errc_t).

I noticed that the [`outcome_throw_as_system_error_with_payload(BoostErrorCodeEnum &&)`](https://ned14.github.io/outcome/reference/functions/policy/outcome_throw_as_system_error_with_payload_boost_enum/) page refers to the trait class `boost::system::errc::is_error_meow_enum<BoostErrorCodeEnum>`. As per the [Boost.System docs](https://www.boost.org/doc/libs/1_70_0/libs/system/doc/html/system.html#ref_boostsystemerror_code_hpp) the trait is spelled `boost::system::is_error_meow_enum` (no `errc` namespace). 

Happily this error does not appear to be reproduced anywhere in the actual code:
- [`error_code_registration.cpp`](doc/src/snippets/boost-only/error_code_registration.cpp) puts the specialization in `boost::system`
- [`boost_result.hpp`](https://github.com/ned14/outcome/blob/develop/include/outcome/boost_result.hpp#L69) just opens the namespace `boost::system::errc` so that (if I follow) ADL allows calling outcome_throw_as_system_error_with_payload(boost::system::errc::errc_t)`.
@ned14 ned14 merged commit c15f61a into ned14:develop Oct 2, 2019
@ned14
Copy link
Owner

ned14 commented Oct 2, 2019

Many thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants