veselink1 / refl-cpp

Static reflection for C++17 (compile-time enumeration, attributes, proxies, overloads, template functions, metaprogramming).
https://veselink1.github.io/refl-cpp/md__introduction.html
MIT License
1.06k stars 77 forks source link

C++ Reflection portable #5

Closed tapika closed 4 years ago

tapika commented 4 years ago

https://github.com/tapika/cppreflect

Should we try to combine ideas, code, design, patterns, test framework on any level with my own C++ reflection library ?

What do you think ?

veselink1 commented 4 years ago

I do really like the presentation and video that you have made for it! Nice work! Sadly, it seems that refl-cpp and C++ Reflection (Portable) have quite a lot of differences in their implementation. I also do like the work you have done with the macro, and did consider something like that for refl-cpp, but decided on the current implementation due to it being more ad-hoc and more flexible (see refl-ht). I don't think you have provided a way to reflect arbitrary member/static functions. And finally, refl-cpp is built around compile-time reflection, whereas C++ Reflection Portable depends on type-erasure, etc.

tapika commented 4 years ago

I think our both libraries - my and yours are more or less hack - cling has far more advanced reflection system: See https://www.youtube.com/watch?v=f9Xfh8pv3Fs&t=17m07s

Meanwhile, I'm trying to wake up cling builds for windows as well. https://github.com/root-project/cling/issues/303

I'll try to use cling in my own projects if possible.

veselink1 commented 4 years ago

I wouldn't say it is a hack per se as all of refl-cpp is standards-compliant. I do not understand how the cling interpreter could be used to replace a compile-time reflection library, but if you've found that it works for you then that's great.