Boost logo

Boost :

From: Bernd Speiser (bernd.speiser_at_[hidden])
Date: 2008-03-27 03:38:20


Sohail Somani wrote:
> On Wed, 26 Mar 2008 20:30:08 +0100, Bernd Speiser wrote:
>
>> Sohail Somani wrote:
>>> On Wed, 26 Mar 2008 16:41:33 +0100, Bernd Speiser wrote:
>>>
>>>> I am separating the exporting macros into a header xxx_export.h.
>>> Just FYI, the suggested method is (now) to have the export macros in
>>> cpp files. Actually, it was OK to do it for 1.34.1 as well, which I
>>> did.
>>>
>>>
>> I did read this in the documentation. However, when implementing our
>> class exports in that way, we encountered runtime errors at
>> /usr/include/boost/archive/detail/oserializer.hpp:418: ... Assertion
>> `__null != bpos_ptr' failed. Abort
>>
>> We could only get rid of this by using the export header method. I must
>> admit that I did not really understand the error ;-) and the remedy was
>> rather by trial and error.
>
> Oh, not a good way to go about it! My guess is that that was an order-of-
> includes problem. For 1.34.1, you had to include all the archives you
> wanted first and *then* include the export header. This requirement is
> now theoretically removed for most compilers.
>

All right, I agree that this is not the optimal way ... However,
sometimes things need to be done. Of course, you are correct, that this
may stike back later.

Coming back to the problem:
I am sure that we did take into account the ordering of headers. This
was clearly spelled out in the documentation, so we followed in that
respect.
The question is:
Is there a problem with separating the export code into additional headers?
And if yes, can this lead to the behavior that I find now when moving to
boost 1.35.0?

Bernd

-- 
=======================================================================
Bernd Speiser
Institut für Organische Chemie
Auf der Morgenstelle 18
temporary address: Auf der Morgenstelle 15
D-72076 Tübingen
Germany
phone: +49-7071-2976205 (office) +49-7071-2976242 (laboratory)
        +49-7071-2972098 (secretary)
fax:   +49-7071-295518
e-mail: bernd.speiser_at_[hidden]
Internet: http://www.uni-tuebingen.de/speiser
=======================================================================

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk