On April 28, 2014 5:54:41 AM EDT, Andrey Semashev
On April 27, 2014 1:47:22 PM EDT, Andrey Semashev
wrote: On Sunday 27 April 2014 13:02:41 Rob Stewart wrote:
On April 27, 2014 10:43:27 AM EDT, Andrey Semashev
wrote: On Friday 25 April 2014 09:25:45 Dominique Devienne wrote:
But what bothered me a little was the note about the fact that pretty_name() was not consistent across platforms/compilers.
There is generally no way to obtain a portable type name. Each
compiler
and platform has its own mangling rules and there are no rules for
demangled type names whatsoever.
The language standard specifies rules for the demangled names, does
it not?
No. The type_info::name() method returns some implementation-defined string with no guarantees on its format. __func__ also has unspecified
On Monday 28 April 2014 05:48:42 Rob Stewart wrote: the format.
To my knowledge, there are no other sources of type name strings in the language.
I wasn't clear. I meant that the language grammar specifies the syntax of the demangled names, though it permits lots of whitespace variation.
The problem is that those strings are not required to follow that syntax. And they don't in some cases.
If they have the required information, however it may be encoded, all that's needed is to resemble it. Is that out of scope? ___ Rob (Sent from my portable computation engine)