Boost logo

Boost :

Subject: Re: [boost] [TypeIndex] Peer review period for library acceptance begins, ending Thurs 21st Nov
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2013-11-12 18:34:55


On 13/11/2013 08:34, Quoth Niall Douglas:
> Boost community feedback is requested for the formal peer review of
> the TypeIndex library by Antony Polukhin.
[...]
> NOTE: Please read the TypeIndex documentation (linked to below)
> before asking any questions e.g. about potential code bloat etc.
> You'll probably find the answer already there.

The docs for .name_demangled() indicate "Readable names may also differ
between compilers: struct user_defined_type, user_defined_type."

Is it feasible to enforce some sort of compiler-independent uniformity
on this (eg. guaranteeing that even if the native typeid output would
insert "struct" or "class", name_demangled() would strip it off before
returning it)? It would be good for code portability if users didn't
have to worry about possibly externally stripping such things to produce
"nice" output, or consistent output between compilers.

I'm also not sure "name_demangled" is a good method name, as "name"
being mangled is a GCC implementation detail that is not true in MSVC,
for example. I would prefer something more generic, such as "long_name"
or "friendly_name", or like MSVC using "raw_name" in place of the
current "name", and "name" in place of the current "name_demangled".


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk