Boost logo

Boost Users :

Subject: Re: [Boost-users] [hash] Reliability of hash_value() for std::string
From: Szymon Gatner (szymon.gatner_at_[hidden])
Date: 2012-02-21 09:14:20


Hi,

W dniu 21 lutego 2012 14:56 u¿ytkownik Nat Linden <nat_at_[hidden]> napisa³:
> On Tue, Feb 21, 2012 at 7:32 AM, Szymon Gatner <szymon.gatner_at_[hidden]> wrote:
>
>> I am coding a simple serialization/factory lib and want to use class hash code
>> based on std::string representing class name as a factory identifier.
>
> There's another potential "gotcha" lurking here: where are you getting
> the class-name string? Is that manually coded, or are you deriving it
> from typeid(myclass).name()? The latter construct is explicitly (and
> empirically) NOT portable.

Yup, I am aware of that, all names are manually typed strings.

Tho, it would be very usefull imho if we could also have like
typeid(MyClass).pretty_name() that would have standard format.

Cheers,
Simon


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net