Boost logo

Boost :

Subject: Re: [boost] [core] Detach demangle() from type_info
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2014-06-06 16:29:57


2014-06-06 23:56 GMT+04:00 Peter Dimov <lists_at_[hidden]>:

> Andrey Semashev wrote:
>
>> And regarding typeinfo.hpp. Aren't we duplicating Boost.TypeIndex here?
>>
>
> Maybe. I use typeinfo.hpp in lightweight_test_trait.hpp though, and the
> less dependencies a test header has, the better, because a compile error in
> a dependency causes all the tests in the world to fail. Which is
> undesirable. (That's also why I split the _trait part from
> lightweight_test.)
>
> Plus, typeinfo.hpp was already present, as detail/sp_typeinfo.hpp, I just
> renamed it.

I've planed TypeIndex to be a fixed version of detail/sp_typeinfo.hpp
(workarounds for compilers, names demangling, hashing ...). Currently
TypeIndex is on level 8 because of the dependency to functiona/hash_fwd.hpp
(it's sad).

After this release of Boost I was planning to push patches to different
submodules and fix the usage of typeids all around the Boost using the
TypeIndex library (of course after dropping the dependency to Functional
somehow).

However I'd prefer it to be detached from type_info. This tool would be
> useful with different kinds of symbols, like function and variable names,
> not just type_info. So it better accept a string as an argument and not
> type_info. demangled_name() should probably be in core/typeinfo.hpp.
>

Do not move it into the typeinfo.hpp. This file will be deprecated or
replaced with TypeIndex soon. It's better to keep it separate.

-- 
Best regards,
Antony Polukhin

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