C++ dynamic reflection.
相关想法以及lib
Lua 有想过用reflection实现lua binding,但没想过反过来
moc依赖于qt的lib,不考虑了
https://github.com/rttrorg/rttr VS2013 build ok
http://preshing.com/20180116/a-primitive-reflection-system-in-cpp-part-1/
https://github.com/chakaz/reflang
http://www.extreme.indiana.edu/reflcpp/
http://preshing.com/20180124/a-flexible-reflection-system-in-cpp-part-2/
http://www.cs.sjsu.edu/faculty/pearce/modules/lectures/oop/types/reflection/prototype.htm
Dispatch COM
https://chinbilly.blogspot.com/2016/03/ponder-c-reflection.html
http://cpgf.org/document/index.html
http://donw.io/post/reflection-cpp-1/
http://www.vollmann.com/en/pubs/meta/meta/meta.html
https://github.com/Manu343726/siplasplas uses a libclang based script to generate C++ code with all the metadata.
https://svn.boost.org/svn/boost/sandbox/mirror/doc/html/mirror.html#mirror.intro
相关测试:
类型转换测试rttr
class string_wrapper { std::string s_; public: string_wrapper(std::string s="") :s_(s) { } }; variant aa = 123; bool ok; std::string aaa = aa.convert<std::string>(&ok); // OK string_wrapper bbb = aa.convert<string_wrapper>(&ok); //Fail