Boost logo

Boost :

Subject: Re: [boost] [Serialization] BOOST_CLASS_EXPORT regression on SunCC
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-02-16 23:25:36

Look at the code - It's not just SunCC

template <class Archive, class Serializable>
struct ptr_serialization_support
# if defined(BOOST_MSVC)
virtual BOOST_DLLEXPORT void instantiate() BOOST_USED;
# elif defined(__BORLANDC__)
static BOOST_DLLEXPORT void instantiate() BOOST_USED;
enum { x = sizeof(instantiate(),3) };
# else
static BOOST_DLLEXPORT void instantiate() BOOST_USED;
typedef instantiate_function<
> x;
# endif

Can we not find some bit of magic to make SunCC instatiate that whic is

Robert Ramey

Sohail Somani wrote:
>> From version 1.34 to 1.35, the export of classes was modified so that
> all the archives did not need to be included before calls to
> BOOST_CLASS_EXPORT. I don't know why this was a problem to begin with.
> Anyway, this feature used to work on SunCC but with the new changes,
> there is a regression. This is caused by the dependence on ADL to
> instantiate the ptr_serialization_support members: SunCC just doesn't
> do
> it. So the instantiations never occur and you get an assertion failure
> when running the serialization tests under debug:
> Assertion failed: it != boost::serialization::singleton<
> oserializer_map<Archive> >::get_const_instance().end(), file
> vendor/boost_1_37_0/boost/archive/impl/archive_pointer_oseri\
> alizer.ipp, line 64
> I know how to fix it (instantiating manually for each
> Archive,Serializable pair, not a huge problem).
> I would suggest that Boost Serialization should have a fallback
> mechanism for
> these compilers. Perhaps along the lines of the old export
> functionality where the user would define the archives they are
> interested in.
> Thoughts?
> _______________________________________________
> Unsubscribe & other changes:

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