-
Notifications
You must be signed in to change notification settings - Fork 93
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_from support without including a Boost.JSON header #549
Comments
These declarations should have comments explaining the rationale for their signatures |
The easiest fix here is to change
to
|
... however, doing so still doesn't enable the code to compile, because So instead of changing the above declaration, we need to introduce another API that works when
with some better name. The
which is even easier to use and automatically uses the right storage. (And the signature matches that of |
Is this a public API? |
How would anyone use it otherwise? |
It's important for class authors to be able to write the appropriate
tag_invoke
overload for their types without needing to include a Boost.JSON header (in order to not require Boost.JSON to be present when not used.) A minimal example is https://godbolt.org/z/jqMj4o4j4. The immediate problem is thatvalue_from
can't be forward declared because it has a default argument.The text was updated successfully, but these errors were encountered: