From 93ced30770b1c44e140125a01ad90ebc2e0129d7 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 19 Apr 2015 01:02:34 +0200 Subject: [PATCH] Format-Utils: switch to demangled type names TODO: might break some unit-tests... Explanation: our wrapper around boost::format has special built-in support for custom operator string(). Any type, which is neiter standard, or printable through such a custom string conversion, is represented as a type-string. For this fallback case, we now use our recently added demangling call (which actually relies on a rather obscure but standard compiler API) --- src/lib/format-util.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/format-util.hpp b/src/lib/format-util.hpp index c060299f7..8ead91fab 100644 --- a/src/lib/format-util.hpp +++ b/src/lib/format-util.hpp @@ -48,6 +48,11 @@ #include +namespace lib { +namespace test{ // see test-helper.cpp + std::string demangleCxx (lib::Literal rawName); +}} + namespace util { @@ -107,7 +112,7 @@ namespace util { inline string tyStr (const TY* =0) { - return string("«")+typeid(TY).name()+"»"; + return "«"+ lib::test::demangleCxx (typeid(TY).name())+"»"; } template