GithubHelp home page GithubHelp logo

Alternative way to adapt struct? about fusion HOT 3 OPEN

boostorg avatar boostorg commented on July 1, 2024
Alternative way to adapt struct?

from fusion.

Comments (3)

daminetreg avatar daminetreg commented on July 1, 2024

Hello, first apologies for the review of #243 is just me lagging hard because of my role in the startup I build, sorry for this, I really appreciate the great work integrating fusion with pfr, I just couldn't finish my review yet, I actually have started changing our code at tipi.build that uses Boost.Fusion to use the pfr enabled patch and so far it looks great.

The only thing that bothers me is that we loose the string name representation of the field in comparison to non-PFR adaption that always populate it, do you have any alternative to do that ?

Regarding the tie_members constexpr member that would be the same issue I would see, additionally without thinking too much why not consteval instead of constexpr, as this never has to run at runtime ?

from fusion.

denzor200 avatar denzor200 commented on July 1, 2024

The only thing that bothers me is that we loose the string name representation of the field in comparison to non-PFR adaption that always populate it, do you have any alternative to do that ?

PFR does not provide such an opportunity, most likely it is not possible, not the fact that the language will allow this.
If someone needs this in fusion, we will have to contrive.

from fusion.

daminetreg avatar daminetreg commented on July 1, 2024

Well I don't think it has been fusion goal in the design of fusion. I think I asked @djowel once about the fact of adding more reflection capabilities and he didn't thought it was a good idea to have it inside fusion.

It just happens to be used heavily and relied upon. I wouldn't put it as something required, I was just curious if you had any trick or magic you used in such case. One could always map the member string name by instantiating templates manually, now that I think to it.

from fusion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.