To expand on Jonathan Wakely's answer, the typical use of typeid
is
if ( typeid(variable1) == typeid(variable2) )
// same type
but also
if ( typeid(variable1).name() == typeid(variable2).name() )
// same type
as you can see there is no need to know the exact implementation-defined name. Since you don't really need that, the standard gives the implementation freedom to implement it in a more efficient way, which is reasonably good.
For example, compare
_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S8_
and std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
: definitely less verbose and efficient, to compare and to store.