[Bug 284953] typeid() returns mangled string that can't be demangled
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 21 Feb 2025 20:18:45 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284953
Dimitry Andric <dim@FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dim@FreeBSD.org
Status|New |Closed
Resolution|--- |Not A Bug
--- Comment #2 from Dimitry Andric <dim@FreeBSD.org> ---
The name() member of std::type_info returns an implementation-defined string
signifying the type. The standard says you cannot count on any particular
interpretation of this string, but in practice it usually contains a mangled
version of the name.
In this particular case, you should add "_Z" to the front of the string, before
demangling:
$ c++filt
_ZN9proxsuite6linalg3veg3VecIbNS1_3mem11SystemAllocELNS3_13DtorAvailableE2ELNS3_13CopyAvailableE2EEE
proxsuite::linalg::veg::Vec<bool, proxsuite::linalg::veg::mem::SystemAlloc,
(proxsuite::linalg::veg::mem::DtorAvailable)2,
(proxsuite::linalg::veg::mem::CopyAvailable)2>
--
You are receiving this mail because:
You are the assignee for the bug.