Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Code bloat

Without RTTI TypeIndex library will switch from using boost::typeindex::stl_type_index class to boost::typeindex::ctti_type_index. boost::typeindex::ctti_type_index uses macro for getting full text representation of function name for each type that is passed to type_id() and type_id_with_cvr() functions.

This leads to big strings in binary file in C++11 mode:

static const char* boost::detail::ctti<T>::n() [with T = int]
static const char* boost::detail::ctti<T>::n() [with T = user_defined_type]

Starting from C++14 the strings are much shorter and contain only the actual type name:

int
user_defined_type

With RTTI, you'll always get the short strings in binary files:

i
17user_defined_type

PrevUpHomeNext