-
Notifications
You must be signed in to change notification settings - Fork 68
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
pfr_fields_view #241
pfr_fields_view #241
Conversation
Here is just docs for "pfr_fields_view".. |
Docs for "pfr_view" and for "BOOST_FUSION_ADAPT_PFR" extension will be in another PRs. |
This will introduce a dependency. I am not sure... We should think about this more. Hopefully, it is decoupled in a separate include? |
You mean dependency of Fusion from Boost.PFR Library, right?
Yes, all pfr_view's must be in a separate include to preserve backward compatibility, cause of Boost.PFR an C++14 library. This fact is documented everywhere like this:
|
dabc7b9
to
bc503c8
Compare
@djowel, fixed |
I just wanted to add that I'm watching this from far (not much time sadly at the moment). And wanted to say this is really awesome and I love it (as last big contributor on BOOST_FUSION_ADAPT_STRUCT). I did a pfr integration in this direction for my talk at CppCon last year, happy @denzor200 you are doing that cleanly ready for prime time. It makes boost fusion work out of the box for many types and many automations based on Fusion work seamlessly with types that aren't "ADAPTED". The future is in this PR. 👍 |
Are we ready for review and merge? |
How about doing a review @daminetreg ? |
PR is ready for review and merge. I have no planned changes |
I would like to apologize for the delay. I'll happily make a first review. |
Hello everyone, how are you? Do you have an interest/opportunity to continue moving within this PR? |
hello yes I’ll review this weekend very sorry for the big delay |
I started reviewing but will need a bit more time, before being able to push the first comments, I started using the pfr_view in test programs. Looks cool. :-) I'll come back to you here by the end of the week. |
That would be nice, but I haven't found a way to do this with clean changes yet. I really would not like to make changes in the core of Boost Fusion. But, if your request is a serious request, I can continue the search how to do it in the near future. Also, don't forget that your 'step further' is more likely to regress than the implementation I've shown here. Even if it will be a super clean changes. |
If I understand you correctly, instead of a macro, you propose to implement specializations of the This will most likely work and the custom struct will be serialized by Fusion without I propose to do the automatic serialization you suggested, but leave my version as a backup for a difficult situation. In total, there will be three ways to serialize a structure:
We'll remove the @daminetreg What do you think about this? (* for this you need to know that this structure can be serialized via PFR, otherwise I do not have the right to specialize |
Unfortunately, it didn't work out. As it turns out, many Fusion methods require the argument to match the Sequence concept, I do not deny that this could be solved through the |
Conflicts: CMakeLists.txt
This PR ready for review. Another PRs(pfr view, pfr extension) will be actualized in the near future. |
The problem of this PR (omitting additional dependencies it brings) is addition of |
I understand correctly that you also as @daminetreg propose to upgrade Fusion to automatically use PFR on non adapted types? Like this:
Instead of this:
Correct me if I misunderstood you. |
Pretty much yes, though I still think the support should be opt-in (by including some enabling header first). |
Why not, but then an attribute will be passed to Spirit that's not a Sequence, but at the same time has overloaded methods ( |
We use |
Looking at https://github.com/boostorg/pfr/blob/develop/include/boost/pfr/detail/fields_count.hpp I feel like it is very much possible (and it also seems possible to make PFR work with empty bases classes). |
You suggest to resolve boostorg/pfr#56 on the PFR side?
I doubt that it will be possible to do this in c++14 https://godbolt.org/z/nvvzrTr9G (off-top) |
I created pfr ticket: boostorg/pfr#100 and i works with PR for this ticket. |
I doned docs and posted it here: boostorg/pfr#107 |
Is there any progress on this? |
Indeed, I'd love to get this merged soon. Are there any showstoppers that need to be addressed, that are preventing merge? |
Of course, I'm working on it now on the PFR side, then I will return to the Fusion and this PR will be actualized(or recreated).
We have to wait when boostorg/pfr#111 and boostorg/pfr#86 will be accepted and merged into PFR. And till we waiting, we can do something with broken CI, I suggested a fix here: #262 |
Hello everyone, I have a good news, both PRs(boostorg/pfr#111 and boostorg/pfr#86) successfully merged into PFR, I'm ready for switch to working on Fusion. This PR will be reacreated in a very very nearest future. |
closed because not actual. |
This PR is a part of the issue #231.