Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] assert in void_caster
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-06-29 15:52:32


Emil Dotchevski wrote:
> On Windows, the standard library goes to great lengths to make
> std::type_info objects that identify the same type from different DLLs
> compare equal. This could lead to problems in case the DLLs have
> different version of the type, but it doesn't mean that the use is
> invalid when all DLLs have identical copies of the type.

Of course not. BUT there is no way to tell. Now one has
introduced a wild card variable into his program. Its worse,
a test program might fail on one machine and pass on another
just because a different DLL is loaded. Or, a problem might
suddenly appear when something totally related is installed.
DLL hell of the worst kind.

> I think the same logic applies to void_cast_register: when multiple
> registrations for the same type from different DLLs occur, it should
> assume that the types are identical.

lol - That would be fine by me if when the application inexplicably
crashes or fails in some way, users wouldn't assume that the source
of the problem is in the serialization library.

In my view, including the same code in different DLLS is a symptom
of poor code organization. So my view is to trap it (at least in debug
builds) and permit the user to override the trap if he is willing
to be responsable for the consequences.

Robert Ramey


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