Boost logo

Boost :

From: Pablo Aguilar (pablo.aguilar_at_[hidden])
Date: 2005-03-18 16:36:57


"Russell Hind" <rh_gmane_at_[hidden]> wrote in message
news:d1cmt9$b7h$1_at_sea.gmane.org...
> Jeff Garland wrote:
>>
>> Ok -- added to the 1.33 todo list -- although 5.6.4 looks a bit shaky
>> from a
>> serialization lib point of view. A bunch of the archive tests are marked
>> as
>> failing. Anyway, we will turn on the regression tests soon. Of course
>> there's some date_time limits as well w.r.t. output on 5.6.4.
>>
>
> Hi Jeff,
>
> Pablo Aguilar has found the issue with serializing ptimes and bcc32. The
> serialize functions work fine, unless you pre-compile the serialization
> headers and not the time_serialize.hpp header. This leads to the error
>
> [C++ Error] serialization.hpp(121): E2015 Ambiguity between
> 'boost::serialization::void
> serialize<boost::archive::text_oarchive>(boost::archive::text_oarchive
> &,boost::posix_time::ptime &,const unsigned int)' and
> 'boost::serialization::void
> serialize<boost::archive::text_oarchive,boost::posix_time::ptime>(boost::archive::text_oarchive
> &,boost::posix_time::ptime &,const unsigned int)'
>
> The solution is to either not pre-compile any of the serialization stuff
> or add time_serialize.hpp to the pre-compiled list also.
>
> So looks like nothing for you to fix for 1.33 :) (Unless you want to add a
> note about this to the docs)
>
> Thanks
>
> Russell

I was going to post about this but you beat me to it!

There's one last catch (which I had to go through) to get this to work.
I did as Russel suggested, and put everything in the PCH, only to find out
I'd tried that before but had gotten the error "initialized data something,
can't create PCH". The error came from including "locale" in the PCH also (I
guess string pulls it in, I don't know, didn't bother looking).

So, after changing out of the "library is right, I must be doing something
wrong" mode, I found that "locale" missdetects the borland compiler, it has
an
#ifdef __BORLANDC

where it should've been __BORLANDC__

Since I'm using BCB6 straight out of the box + update pack 4, I'm guessing
other people might run into the same thing, so I think it should be
mentioned in the docs Robert R./Jeff G. said they'd include, even though
it's not a boost specific issue.

Hope this helps

Pablo


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