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

Boost PFR as implicit fallback #266

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from

Conversation

denzor200
Copy link
Contributor

@denzor200 denzor200 commented Dec 30, 2022

#231

This PR suggests to use PFR in the Fusion like implicit fallback. It means that Fusion will try using PFR for types that isn't a Fusion Sequence.
This is an optional functional enables by inclusion of special header (adapted/boost_pfr.hpp, for example), or it enables by inclusion of just adapted.hpp. If you don't need this, just don't include special header, or disable PFR using special macro( BOOST_PFR_ENABLED, for example ).

If you need to use PFR, but you don't want to use it like implicit fallback, you may disable implicit reflection and use explicit instead. Explicit reflection requires from user to specify all reflectable types manually using one of the suggested macroes.
Explicit reflection is provided by the header adapted/boost_pfr_explicit.hpp.

It's able to play with this PR here: https://godbolt.org/z/vMMf8GTE4

This was referenced Dec 30, 2022
@denzor200 denzor200 marked this pull request as draft December 30, 2022 14:49
@denzor200 denzor200 closed this Jan 10, 2023
@denzor200 denzor200 reopened this Jan 10, 2023
@denzor200 denzor200 force-pushed the pfr_implicit_explicit branch 4 times, most recently from f76d203 to f11cca0 Compare January 11, 2023 14:36
doc/adapted.qbk Outdated Show resolved Hide resolved
test/sequence/boost_pfr_empty.cpp Show resolved Hide resolved
include/boost/fusion/support/config.hpp Show resolved Hide resolved
include/boost/fusion/support/config.hpp Outdated Show resolved Hide resolved
include/boost/fusion/support/config.hpp Outdated Show resolved Hide resolved
test/sequence/boost_pfr_explicit.cpp Outdated Show resolved Hide resolved
test/sequence/boost_pfr_force_macro.cpp Outdated Show resolved Hide resolved
test/sequence/boost_pfr_iterator.cpp Outdated Show resolved Hide resolved
include/boost/fusion/adapted.hpp Show resolved Hide resolved
test/Jamfile Outdated Show resolved Hide resolved
test/sequence/comparison.hpp Outdated Show resolved Hide resolved
include/boost/fusion/adapted/boost_pfr/force.hpp Outdated Show resolved Hide resolved
test/sequence/with_or_without_fallback.hpp Outdated Show resolved Hide resolved
include/boost/fusion/adapted/boost_pfr/tag_of_fallback.hpp Outdated Show resolved Hide resolved
test/sequence/boost_pfr.cpp Show resolved Hide resolved
test/sequence/boost_pfr_empty.cpp Show resolved Hide resolved
@denzor200 denzor200 marked this pull request as ready for review January 29, 2023 09:41
@denzor200
Copy link
Contributor Author

@djowel, @daminetreg , @Kojoley I'm ready to show this PR.
Would you like to join the review?

@denzor200
Copy link
Contributor Author

@djowel Hello, are we going on?

@daminetreg
Copy link
Contributor

Wow awesome that's terrific. I missed your comment from 29th January. I will do my best to review and try it out this Friday.

@denzor200
Copy link
Contributor Author

@daminetreg Cool!

@denzor200
Copy link
Contributor Author

@daminetreg Hi! I want to inform that I may be unavailable a month later for some time. Can we do something with this PR right now, or we will just postpone it for some time?

How is your review going on, is there any trouble or just not enough time for it? Can I help you with something?

Maybe I should reduce this PR throwing away the implicit reflection? We would merge the explicit one pretty fast, and then leisurely continue working on huge implicit reflection having already released the first PFR integration.

@daminetreg
Copy link
Contributor

daminetreg commented Apr 27, 2023

Hi @denzor200 , sorry for the delay I couldn't try yet but I will do my best to give my early feedback this week still. I think it's a very awesome feature, so we should not wait too long for merging. I apologies for my bandwidth here.

@xR3b0rn
Copy link

xR3b0rn commented Aug 8, 2023

Any updates on this?

@denzor200
Copy link
Contributor Author

@xR3b0rn everything ready from my side, waiting for review. As I informed above, I was unavailable for some months. But right now I'm available every day and can react to review pretty fast.

@daminetreg

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

Successfully merging this pull request may close these issues.

3 participants