|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2007-04-27 21:51:09
The macro can't work with templates even if the xml syntax
issue were resolved.
One has to use
BOOST_EXPORT_CLASS_GUID(Something<MyThing>,"Something_MyThing"); // works
\o/
This is because the GUID has to be different for each class. They can't ll
be
"Something_T"
Robert Ramey
Sohail Somani wrote:
> Hi,
>
> Quite sensibly, xml_archive seems to fail with archive errors when
> class_name contains xml characters (like <) which are quite common in
> templates. For example, in my tests:
>
> BOOST_EXPORT_CLASS(Something<T>); // fails when deserializing because
> of parse error.
>
> I fix it by doing:
>
> BOOST_EXPORT_CLASS_GUID(Something<T>,"Something_T"); // works \o/
>
> Now, do you suppose xml_archive could be smart enough to convert < to
> < and similarly for other prohibited characters when serializing?
> Even if not, is there something I can do in 1.33.1 that would make it
> not so redundant?
>
> Thanks,
>
> Sohail
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