Re: [Boost-users] Boost serialization: how to register template derivedclass

Hi,
I hope what I'm saying here makes sense and won't be considered
flooding.
While trying to check the reason for BOOST_CLASS_EXPORT not working with
templates, I found out the problem is simply a preprocessor issue - it
treats each comma as a seperation between values, so
it treats a template (as below) as two inputs (and the MACRO accepts
only one).
We implemented BOOST_CLASS_EXPORT_WITH_TWO_VALS, and it worked fine with
the template argument below, saving us the need to expand the macro for
each instantiation.
Is there anything we're missing here? Is support for this planned in
future Boost releases?
Thanks for your time,
Yair Lifshitz
Intel Israel
----- Forwarded Message ----
From: Robert Ramey ::operator<< #13 0x0000000000401299 in
boost::archive::detail::interface_oarchive ::operator& #14 0x000000000040124c in foo::serializeboost::archive::text_oarchive
()
#15 0x0000000000401197 in
boost::serialization::access::serialize ::operator<< <foo const> () #25 0x0000000000400423 in main ()
(gdb) Quit
Thanks,
-Ariella
________________________________
From: Voloshin, Ariella
Sent: Tuesday, May 20, 2008 11:10 AM
To: Lifshitz, Yair
Subject: RE: Hey
Yes I will use it,
I guess you will need to register the: boost-users@lists.boost.org.
The guy that wrote the boost serialization library is Robert Ramey
ramey@rrsd.com.
If you like to answer from my email thread please let me know.
________________________________
From: Lifshitz, Yair
Sent: Friday, May 16, 2008 8:55 AM
To: Voloshin, Ariella
Cc: Lifshitz, Yair
Subject: RE: Hey
Great! :)
So I hope you're going to use it.
Can you send me the Boost owner's mail - I want to have a look and maybe
have a chat with him.
________________________________
From: Voloshin, Ariella
Sent: Thursday, May 15, 2008 11:01 PM
To: Lifshitz, Yair
Subject: Hey
It is working,
Took some time to compile, long story but it is working.
The string is also ok.
Thanks,
-Ariella
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

On Tue, May 20, 2008 at 5:02 PM, Lifshitz, Yair
While trying to check the reason for BOOST_CLASS_EXPORT not working with templates, I found out the problem is simply a preprocessor issue - it treats each comma as a seperation between values, so it treats a template (as below) as two inputs (and the MACRO accepts only one).
----- Forwarded Message ---- From: Robert Ramey
To: boost-users@lists.boost.org Sent: Thursday, May 8, 2008 7:49:08 AM Subject: Re: [Boost-users] Boost serialization: how to register template derivedclass what you would really need is something like
BOOST_CLASS_EXPORT(KukuBase
);
Would wrapping the argument with in braces not help?
Ex: BOOST_CLASS_EXPORT((KukuBase

Or a tmp typedef: typedef foo<bar> foobar; BOOST_CLASS_EXPORT(foobar); last I looked (1.33.1) there were problems when serializing exported templated types from xml_iarchive. Angle brackes would appear in Bad Places in the archive file. This works around that as well. -t hruva wrote:
On Tue, May 20, 2008 at 5:02 PM, Lifshitz, Yair
wrote: While trying to check the reason for BOOST_CLASS_EXPORT not working with templates, I found out the problem is simply a preprocessor issue - it treats each comma as a seperation between values, so it treats a template (as below) as two inputs (and the MACRO accepts only one).
----- Forwarded Message ---- From: Robert Ramey
To: boost-users@lists.boost.org Sent: Thursday, May 8, 2008 7:49:08 AM Subject: Re: [Boost-users] Boost serialization: how to register template derivedclass what you would really need is something like
BOOST_CLASS_EXPORT(KukuBase
); Would wrapping the argument with in braces not help? Ex: BOOST_CLASS_EXPORT((KukuBase
)); -dky
participants (3)
-
dhruva
-
Lifshitz, Yair
-
troy d. straszheim