Worked around C4127 warning with MSVC.
Removed unused demangle() function.
Added a pseudo-test for typename formatting.

The test doesn't verify correctness of the output because the formatting result is platform-dependent. The test succeeds if the formatting code compiles and doesn't crash in typical use cases. The output correctness can be checked manually.