开发者

Boost library for RTTI [closed]

As 开发者_运维技巧it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

which boost library should I use to implement RTTI in my project?? Is it Statechart library?


RTTI is built into the C++ language, with features like dynamic_cast and typeid. You don't need boost to use it.


RTTI is built into the C++ language. However, you'll find a few RTTI-related, convenient tools in Boost, e.g. Boost.TypeTraits which enables you to checks such as is_base_of(), has_trivial_constructor() and loads of other stuff. Boost.FunctionTypes might also be worth checking out.


A simple RTTI is built into the C++ language, although you can opt out of it (decreases binary size). You can read about RTTI in C++ here.

If you're searching for something more robust (e.g. Reflection) unfortunately there's no simple solution for that, but it's planned for after-C++0x. There was a Reflection library suggested for Boost, but it hasn't been accepted (yet?). You can find it here : http://boost-extension.blogspot.com/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜