Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3747: Serialization code speculate in order of static initialization
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-03-31 06:20:37
#3747: Serialization code speculate in order of static initialization
--------------------------------------------------+-------------------------
Reporter: Runar Undheim <r.undheim@â¦> | Owner: ramey
Type: Bugs | Status: reopened
Milestone: Boost 1.43.0 | Component: serialization
Version: Boost 1.41.0 | Severity: Showstopper
Resolution: | Keywords: serialization static order
--------------------------------------------------+-------------------------
Changes (by Runar Undheim <r.undheim@â¦>):
* status: closed => reopened
* resolution: invalid =>
Comment:
By you answer, it does not seems to me that you have understood my
problem. Could you please take another look (make sure you include
serializationRegistration.cpp in your project)?
If CLASS_EXPORT_IN_MAIN is 0 then the registration is done inside
serializationRegistration.cpp. So this define only move the registration
between main.cpp and serializationRegistration.cpp. It does not remove the
registration:
{{{
#include "serializationClasses.hpp"
#if !CLASS_EXPORT_IN_MAIN
BOOST_CLASS_EXPORT(Object)
BOOST_CLASS_EXPORT(Main)
#endif
}}}
I don't see anything in the documentation telling me that
BOOST_CLASS_EXPORT must be in a special file, but it must be after the
include of archive class headers.
Please look into order_of_static_registration_fail.txt and
order_of_static_registration_ok.txt. You see that the files contains the
same number of static initializations, but that the order of the function
calls are different.
Runar Undheim
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3747#comment:14> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC