format: add a custom formatter for std::type_info
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 12 May 2022 18:32:32 +0000 (14:32 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 13 Jun 2022 20:34:46 +0000 (16:34 -0400)
commit5bb4ff54d92e0a4520f02d08601a0c25f4d2505f
tree902bd8749c3b5ca4030dfb0625b93e6404a38207
parentbd2c951e542d484ca308a0e8de6b1b420ffef2ce
format: add a custom formatter for std::type_info

The name() returned by std::type_info is implementation-dependant. In
practice, it is typically the type's mangled name. For GCC and clang, it
is possible to use abi::__cxa_demangle to demangle the name at runtime
while formatting a string.

If this poses any compatibility problem on other platforms, we can
fallback to using name() directly.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ib80babe4039c91ce6fdf6d9a9442c31645a43b08
src/common/format.hpp
This page took 0.026909 seconds and 5 git commands to generate.