<p>I'm currently working on some logging code that supposed to - among other things - print information about the calling function. This should be relatively easy, standard C++ has a <code>type_info</code> class. This contains the name of the typeid'd class/function/etc. but it's mangled. It's not very useful. I.e. <code>typeid(std::vector&lt;int&gt;).name()</code> returns <code>St6vectorIiSaIiEE</code>.</p>

<p>Is there a way to produce something useful from this? Like <code>std::vector&lt;int&gt;</code> for the above example. If it only works for non-template classes, that's fine too.</p>

<p>The solution should work for gcc, but it would be better if I could port it. It's for logging so it's not so important that it can't be turned off, but it should be helpful for debugging.</p>

It's implementation defined, so it's not something that's going to be portable.  In MSVC++, name() is the undecorated name, and you have to look at raw_name() to get the decorated one.
Just a stab in the dark here, but under gcc, you might want to look at
demangle.h