RE: [boost] Re: Re: Non-intrusive serialization with VC2003 (7.1)

-----Original Message----- From: Robert Ramey [mailto:ramey@rrsd.com] Sent: 16 May 2005 16:30 To: boost@lists.boost.org Subject: [boost] Re: Re: Non-intrusive serialization with VC2003 (7.1)
Note the "long int hack" isn't used with vc 7.1 as it support correct partial template ordering.
Interesting. Still doesn't explain why the compiler is trying to use the intrusive stuff, rather than the non-intrusive layer, at least to my relatively unschooled C++ mind. Is there anything I should do, or should I try something like writing wrapper classes for everything?
-----Original Message----- From: Robert Ramey [mailto:ramey@rrsd.com] Sent: 13 May 2005 15:51 To: boost@lists.boost.org Subject: [boost] Re: Non-intrusive serialization with VC2003 (7.1)
Try putting your function inside the namespace D2
I did. I also tried putting it in the global namespace. Same error.
Robert Ramey
Marcin Tustin wrote:
I'm trying to use the serialization and archive
Marcin Tustin wrote: libraries, and I'm
having a bit of trouble getting non-intrusive serializaton to work; I keep getting the error "c:\boost_1_32_0\boost\serialization\access.hpp(106): error C2039: 'serialize' : is not a member of 'D2::Message'". My guess is that for some reason the "long int" hack isn't working properly. I have serialize methods in the boost::seralization namespace like this:
namespace boost { namespace serialization { template<class Archive > static void serialize(Archive & ar, const D2::Message& g, const unsigned int version) { //... }
} };
Which are textually before any use of the library, as far as I can tell.
Any help would be much appreciated.
Marcin Tustin IT Innovation Centre 2 Venture Road Chilworth Science Park Southampton, SO16 7NP, UK
tel: +44 23 8076 0834 fax: +44 23 8076 0833
mailto:mt@it-innovation.soton.ac.uk http://www.it-innovation.soton.ac.uk
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

I don't remember whether your using 1.32 or the current CVS. This is relevant because for 1.33 a made some changes so that compilers with and without ADL and/or Two phase lookup all work the same as regards namespace. This was sort of messy in 1.33. The only thing that I notice that seems odd to me is that you're using "static". perhaps this alters the signature enough to create the problem. Its hard for me to speculate. So I'll be very grateful when you find the problem. With the extensive error trace produced by vc 7.1 it shouldn't be tooooo hard to see where its making the wrong choice. Robert Ramey Marcin Tustin wrote:
-----Original Message----- From: Robert Ramey [mailto:ramey@rrsd.com] Sent: 16 May 2005 16:30 To: boost@lists.boost.org Subject: [boost] Re: Re: Non-intrusive serialization with VC2003 (7.1)
Note the "long int hack" isn't used with vc 7.1 as it support correct partial template ordering.
Interesting. Still doesn't explain why the compiler is trying to use the intrusive stuff, rather than the non-intrusive layer, at least to my relatively unschooled C++ mind. Is there anything I should do, or should I try something like writing wrapper classes for everything?
-----Original Message----- From: Robert Ramey [mailto:ramey@rrsd.com] Sent: 13 May 2005 15:51 To: boost@lists.boost.org Subject: [boost] Re: Non-intrusive serialization with VC2003 (7.1)
Try putting your function inside the namespace D2
I did. I also tried putting it in the global namespace. Same error.
Robert Ramey
Marcin Tustin wrote:
I'm trying to use the serialization and archive
Marcin Tustin wrote: libraries, and I'm
having a bit of trouble getting non-intrusive serializaton to work; I keep getting the error "c:\boost_1_32_0\boost\serialization\access.hpp(106): error C2039: 'serialize' : is not a member of 'D2::Message'". My guess is that for some reason the "long int" hack isn't working properly. I have serialize methods in the boost::seralization namespace like this:
namespace boost { namespace serialization { template<class Archive > static void serialize(Archive & ar, const D2::Message& g, const unsigned int version) { //... }
} };
Which are textually before any use of the library, as far as I can tell.
Any help would be much appreciated.
Marcin Tustin IT Innovation Centre 2 Venture Road Chilworth Science Park Southampton, SO16 7NP, UK
tel: +44 23 8076 0834 fax: +44 23 8076 0833
mailto:mt@it-innovation.soton.ac.uk http://www.it-innovation.soton.ac.uk
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Robert Ramey <ramey <at> rrsd.com> writes:
I don't remember whether your using 1.32 or the current CVS.
This is because I didn't say :). I was using 1.32, and I've now tried it with the latest CVS stuff.
This is relevant because for 1.33 a made some changes so that compilers with and without ADL and/or Two phase lookup all work the same as regards namespace. This was sort of messy in 1.33.
The only thing that I notice that seems odd to me is that you're using "static". perhaps this alters the signature enough to create the problem. Its hard for me to speculate.
The "static" is a relix of a previous attempt to beat the compiler into submission - removing it doesn't help.
So I'll be very grateful when you find the problem. With the extensive error trace produced by vc 7.1 it shouldn't be tooooo hard to see where its making the wrong choice.
Perhaps I don't know enough about VC 7.1, but what extensive error trace? c:\new_boost\boost\boost\serialization\access.hpp(107): error C2039: 'serialize' : is not a member of 'Jrs::SmartPtr<T>' with [ T=D2::Message ] is all that I get. I can't begin to imagine how I would go about diagnosing the cause of the error.

By extensive error trace I mean the whole chain of instantiations with lines like "instanciated from" ... Sometimes this chain is dozens of lines long. Its the compile-time version of a call stack. This can be used to trace back through the chain of calls to determine which one didn't work as expected. Robert Ramey
Perhaps I don't know enough about VC 7.1, but what extensive error trace?
c:\new_boost\boost\boost\serialization\access.hpp(107): error C2039: 'serialize'
is not a member of 'Jrs::SmartPtr<T>' with [ T=D2::Message ]
is all that I get. I can't begin to imagine how I would go about diagnosing the cause of the error.

One other point of note, when I try to use intrusive serialization (with the CVS version), I get the error: c:\new_boost\boost\boost\archive\detail\oserializer.hpp(551): error C2027: use of undefined type 'boost::STATIC_ASSERTION_FAILURE<x>' with [ x=false ] I don't know if this indicates a broken installation or what.
participants (2)
-
Marcin Tustin
-
Robert Ramey