Boost logo

Boost :

Subject: Re: [boost] [type_index] C++03 implementation in boost?
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2012-07-03 19:51:00


On 03/07/2012 01:59 p.m., Antony Polukhin wrote:
> 2012/7/3 Agustín K-ballo Bergé <kaballo86_at_[hidden]>:
>> The documentation needs some work. There are a considerable number of typos,
>> most notable 'retruns' -> 'returns'.
>
> Could not find it. In what file is it?

Several places in both code and documentation. I will try and provide
you a patch for those.

>> I'm no expert in locales, but I believe your implementation of `before` may
>> be susceptible to global locale changes.
>
> Looks fine for me.

Yes, please disregard. I have just confirmed that `strcmp` is locale
independent.

>> I'm not particularly keen on `name` and `name_demangled` returning different
>> string types. Would it make sense to have `name_demangled` cache the result,
>> and return a `char const*` instead?
>
> Caching the result will increase size of type_index object, and that
> would lead to slower copying/assigning/constructing of type_indexes.
> Demangled names are usually used in non performance critical sections
> (in error reporting; outputting user readable data to stream) and
> usually only once. So I think that not using caching is a little bit
> better than using it.

Caching will certainly increase the size of type_index, but you don't
necessarily need to actually copy them. Anyway, this is just a bit of
nitpicking on my side.

Agustín K-ballo Bergé.-
http://fusionfenix.com


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