Sometimes getting and storing at runtime information about template type is
required. For such cases usually used a construction like <codeclass="computeroutput"><spanclass="special">&</span><spanclass="keyword">typeid</span><spanclass="special">(</span><spanclass="identifier">T</span><spanclass="special">)</span></code> or C++11 class <codeclass="computeroutput"><spanclass="identifier">std</span><spanclass="special">::</span><spanclass="identifier">type_index</span></code>.
And that is the point, where problems strat: * <codeclass="computeroutput"><spanclass="keyword">typeid</span><spanclass="special">(</span><spanclass="identifier">T</span><spanclass="special">)</span></code>
and <codeclass="computeroutput"><spanclass="identifier">std</span><spanclass="special">::</span><spanclass="identifier">type_index</span></code> require Run Time Type Info (RTTI)
const, volatile and references from type * some compilers have bugs and do
not correctly compare <codeclass="computeroutput"><spanclass="identifier">std</span><spanclass="special">::</span><spanclass="identifier">type_info</span></code> across shared libraries * some
implementations of <codeclass="computeroutput"><spanclass="keyword">typeid</span><spanclass="special">(</span><spanclass="identifier">T</span><spanclass="special">)</span></code> do not
strip const, volatile and references * only a few STLs have <codeclass="computeroutput"><spanclass="identifier">std</span><spanclass="special">::</span><spanclass="identifier">type_index</span></code>
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
</p>
<p>
Boost.TypeIndex was designed to work around those issues.