Boost C++ Libraries Home Libraries People FAQ More

Next

Chapter 1. Boost.TypeIndex 1.0

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Table of Contents

Motivation
Getting started
Examples
Reference
Performance

Sometimes getting and storing at runtime information about template type is required. For such cases usually used a construction like &typeid(T) or C++11 class std::type_index. And that is the point, where problems strat: * typeid(T) and std::type_index require Run Time Type Info (RTTI) * typeid(T) strips const, volatile and references from type * some compilers have bugs and do not correctly compare std::type_info across shared libraries * some implementations of typeid(T) do not strip const, volatile and references * only a few STLs have std::type_index implementation * no easy way to store type info without stripping const, volatile and references * no nice and portable way to get human readable type name

Boost.TypeIndex was designed to work around those issues.

Last revised: June 03, 2012 at 09:04:50 GMT


Next