How can I add reflection to a C++ application?

前端 未结 28 1624
感动是毒
感动是毒 2020-11-21 11:25

I\'d like to be able to introspect a C++ class for its name, contents (i.e. members and their types) etc. I\'m talking native C++ here, not managed C++, which has reflection

28条回答
  •  别跟我提以往
    2020-11-21 11:51

    There is another new library for reflection in C++, called RTTR (Run Time Type Reflection, see also github).

    The interface is similar to reflection in C# and it works without any RTTI.

提交回复
热议问题