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
Adding value_to support without including a Boost.JSON header #550
Comments
These declarations should have comments explaining the rationale for their signatures |
Have you considered not doing this and then they put their value_to into a header that includes their type and the boost.json header. That accomplishes the same thing of firewalling boost into a TU, no? |
The easiest fix here is to change the specification of
|
Unfortunately the changes in 31dd295 (see the above PR) make |
Can you provide a minimal example of what exactly was broken? We only have value_to overloads in namespace boost::json. |
In |
Similar to #549, but in the other direction; it should be possible to add
value_to
support without including a Boost.JSON header. A minimal example is in https://godbolt.org/z/WsG33GrMP. Unlike thevalue_from
case, this compiles, and the only reason it doesn't link is that the signature ofvalue_to
does not match the documented one.I'm not sure why it's necessary for
value_to
to disappear from overload resolution whenT
is a reference.value_to
is not intended to be an overload set. References can be disallowed by a static_assert in the body.Not taking
value
in order to disallow implicit conversions is I suppose legitimate, but it can be achieved by adding a deleted templated overload (https://godbolt.org/z/Tqonvj9bT).The text was updated successfully, but these errors were encountered: