Boost logo

Boost :

From: Janek Kozicki (janek_listy_at_[hidden])
Date: 2007-03-16 08:38:37

Robert Ramey said: (by the date of Thu, 15 Mar 2007 18:56:25 -0800)

> Zach Laine wrote:
> > I did something stupid with my serialization code. I blithely changed
> > the names of several polymorphic classes everywhere they appeared in
> > the code, since they had moved out of a class into that class's
> > namespace (e.g. SomeNS::View::Primitive became SomeNS::Primitive).
> > Several months later, I discovered that I could no longer read old
> > binary archives, because I was using Boost.Serialization's
> > BOOST_CLASS_EXPORT() macro, and this macro was now registering the
> > Primtive type with the name-string "Primitive", instead of
> > "View::Primitive", which is how it was saved in the oldest archives.
> Ouch.

IMHO this is the best example demonstrating that sometimes using a
class name as a GUID is not the best idea. If Zach from the very
beginning used a custom string (different that the class name) as a
GUID, this thing would have never happened. Am I right?

Janek Kozicki                                                         |

Boost list run by bdawes at, gregod at, cpdaniel at, john at