
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Robert Ramey Sent: 24 January 2012 17:53 To: boost-users@lists.boost.org Subject: Re: [Boost-users] mpi/serialization: broadcasting derived classhrough base pointer 1.47
MM wrote: typedef templateclass<arg> myclass;
On the sending side, I have BOOST_CLASS_EXPORT_KEY( namespace::namespace::myclass )
I don't know why it is not sent down the pipe.
Note that you'll have to have BOOST_CLASS_EXPORT... on BOTH sides.
This is usually assured by having the save and load symetrical.
Robert Ramey
I have generated preprocessed output of the translation unit and the macros expand correctly to: namespace boost { namespace serialization { template<> struct guid_defined< nicohich::histodatas::daily_data > : boost::mpl::true_ {}; template<> inline const char * guid< nicohich::histodatas::daily_data >(){ return "nicohich::histodatas::daily_data"; } } } namespace boost { namespace serialization { template<> struct guid_defined< nicohich::histodatas::future_daily_data > : boost::mpl::true_ {}; template<> inline const char * guid< nicohich::histodatas::future_daily_data >(){ return "nicohich::histodatas::future_daily_data"; } } } namespace boost { namespace serialization { template<> struct guid_defined< nicohich::histodatas::minute_data > : boost::mpl::true_ {}; template<> inline const char * guid< nicohich::histodatas::minute_data >(){ return "nicohich::histodatas::minute_data"; } } } This bit appears AFTER the _declaration_ of the serialize template function, but _before_ its implementation. These derived types only have the serialize<> template function, not the save and load because they don't need them. The base class has a save() and load(). This is very puzzling, Regards, MM