Boost C++ Libraries 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.

Configuring and building the library

TypeIndex is a header only library and it does not use Boost libraries that require building. You just need to #include <boost/type_index.hpp> to start using it.

The library supports a number of configuration macros, defining which require full rebuild of all the projects that use TypeIndex:

Table 36.1. Configuration macros

Macro name

Short description


Macro that allows you to use your own implementation of TypeIndex instead of the default all around the projects and libraries.


Macro that must be defined if you are mixing RTTI-on and RTTI-off.


Macros that allow you to specify parsing options and type name generating macro for RTTI-off cases.

You can define configuration macros in the bjam command line using one of the following approaches:

    b2 variant=release define=BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY stage
    b2 variant=release "define=BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING='(39, 1, true, \"T = \")'" stage

However, it may be more convenient to define configuration macros in the "boost/config/user.hpp" file in order to automatically define them both for the library and user's projects.