Reflection TS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Reflection TS

Hans Wennborg via cfe-dev
Hi all,

I want to start a thread about implementing the Reflection TS in Clang.  

I've been chatting a bit with Matus Chochlik about this, but I also want to get input from others on the best way to structure the code.  Currently, I'm close to having the parsing for type reflection working.  Right now the reflexpr keyword returns a specialized trait.  My plan was to then define all the reflection traits as type traits that dispatch to an intrinsic.  For value reflection, I was thinking we could follow a similar pattern except we might have to generate a type (instead of simply specializing a template) to represent the value.

I want to get input from others about this direction to see if it is reasonable or not before I go to far.  This is my first time working on Clang, so not sure how these discussions typically start.  Let me know if I should provide more detail on my comments above.

All best,
Nick

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Reflection TS

Hans Wennborg via cfe-dev
It would probably be useful to link the TS in this thread too.  Here is the latest version: http://cplusplus.github.io/reflection-ts/draft.pdf

On Wed, Jan 22, 2020 at 8:55 PM Nick Meyer <[hidden email]> wrote:
Hi all,

I want to start a thread about implementing the Reflection TS in Clang.  

I've been chatting a bit with Matus Chochlik about this, but I also want to get input from others on the best way to structure the code.  Currently, I'm close to having the parsing for type reflection working.  Right now the reflexpr keyword returns a specialized trait.  My plan was to then define all the reflection traits as type traits that dispatch to an intrinsic.  For value reflection, I was thinking we could follow a similar pattern except we might have to generate a type (instead of simply specializing a template) to represent the value.

I want to get input from others about this direction to see if it is reasonable or not before I go to far.  This is my first time working on Clang, so not sure how these discussions typically start.  Let me know if I should provide more detail on my comments above.

All best,
Nick

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev