Boost logo

Boost Users :

Subject: Re: [Boost-users] [hash] Reliability of hash_value() for std::string
From: Nat Linden (nat_at_[hidden])
Date: 2012-02-21 08:56:51

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.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at