Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-05-10 12:55:57


I was going to make this change and start testing, but I don't think
it will work.

using something like:

*this->This() >> input_library_version.t

will lose the "version_type" when the i/o is done. Hence
xml attribute tag "version" won't be "matched up" with
the value. I would recommend tracing into the following

*this->This() >> input_library_version

To see why the version_type serialization isn't being invoked.
This will likely require tracing down pretty deep until you
get to

virtual void vload(version_type & t){
* this->This() >> t;
}

in common_iarchive.hpp.

I would test with xml_iarchive to be sure that the actual version is
found. At some point along way - hopefully very near the bottom,
the t can be replaced with t.t for borland. Or many BOOST_STRONG_TYPE
can be fixed for borland.

Robert Ramey

Nicola Musatti wrote:
> Robert,
> I think I found the problem, but I'm not sure on how to code a
> workaround. Apparently BCB2006 introduced a bug which causes writes
> to a BOOST_STRONG_TYPEDEF to fail, just as if a temporary was
> updated. This
> is affecting specifically the reading of archive versions.
>
> The code below is an example of an effective workaround:
>
> version_type input_library_version;
> #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) &&
> __BORLANDC__ >= 0x580
> unsigned int v;
> * this->This() >> v;
> input_library_version.t = v;
> #else
> * this->This() >> input_library_version;
> #endif
>
> Probably it would be sufficient to just pass input_library_version.t
> to operator>> .
>
> The real problem I have with this workaround is that it would be much
> better to factor it into BOOST_STRONG_TYPEDEF's definition, but I'm
> not
> sure about what is exactly causing the problem and I'm not very
> confident about my ability to add conditions to a macro definition.
>
> Cheers,
> Nicola Musatti
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


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