
----- Original Message ----- From: "Andreas Huber" <ah2003@gmx.net> To: <boost@lists.boost.org> Sent: Monday, April 26, 2004 11:40 AM Subject: [boost] Re: Serialization Formal Review #2
Robert Ramey wrote:
Message: 11 Andreas Huber wrote:
1. On compilers supporting ADL, it seems the user-supplied serialization function for non-intrusive serialization
template<class Archive> void serialize(Archive & ar, gps_position & g, const unsigned int version);
could also be put into the namespace of the type that it serializes. If this is correct it should be mentioned in the tutorial & reference. If not, there should be a rationale why not.
I did try this in my environment VC 7.1 and it failed to work. Does anyone want to assert that it should or shouldn't work?
I'm unsure about VC7.1. It is supposed to work with conformant compilers as detailed here:
http://www.boost.org/libs/smart_ptr/intrusive_ptr.html#Introduction
However, the situation is different there as the called function only accepts exactly one parameter.
It doesn't matter. ADL should find the overload, provided that 'serialize' is not qualified at the point of the call. In my own library I use very similar read/write overloads that are, indeed, placed in the namespace of the corresponding class and found by ADL. Yes, it works with VC 7.1.