----- Original Message -----
From: "Joel de Guzman"
On 1/24/2010 8:29 PM, Hicham Mouline wrote:
Hello, I am aware that it is planned to implement metafunctions that returned the list of member types of a struct, as well as members names, as fusion/mpl sequences. The macro uses some PP magic. My project has progressed that I think I need this feature to proceed. I may try my hand at implementing these features... Which files in boost/fusion are involved in the implementation of the macro?
See boost/fusion/adapted/struct. The member types are already provided through result_of::at_c. Of course (this is the kind of mistakes beginners do, not paying attention:-( )
The names are not (yet). Be warned, I have to insist on updating the docs too :-) Ahem ahem...
Do tell us your proposed interface. One way is to return a fusion sequence of as many "const char*" as there are members in the struct, so the types are "const char*" and the runtime values are the member names. That wouldn't suit my case as I wouldn't be able to generate the spirit grammar wiht PP at compile-time.
How can the member names be stored in the type information of the fusion /mpl sequence as const char* ?
From what I understand, you can only have template non-type arguments that have an external linkage. Hmmm, I don't know.
Docs, absolutely, glad to make any contribution. I need to read up about quickbook, right? regards,