Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

How it works

type_index is just a typedef for boost::typeindex::stl_type_index or boost::typeindex::ctti_type_index.

Depending on the typeid() availability TypeIndex library will choose an optimal class for type_index. In cases when at least basic support for typeid() is available stl_type_index will be used.

BOOST_TYPE_INDEX_REGISTER_CLASS macro is a helper macro that places some virtual helper functions or expands to nothing.

BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS macro is a helper macro that places the same helpers as BOOST_TYPE_INDEX_REGISTER_CLASS plus some additional helpers for boost::typeindex::runtime_cast to function.

Issues with cross module type comparison on a bugged compilers are bypassed by directly comparing strings with type (latest versions of those compilers resolved that issue using exactly the same approach).


PrevUpHomeNext