Boost logo

Boost :

From: Jared McIntyre (jmcintyre_at_[hidden])
Date: 2004-12-02 13:44:16

I've been out of town, so I haven't had the chance to look back at
this issue until today. This is the code for the non-intrusive

template<class Archive>
void serialize(Archive & ar, SWHandle & handle, const unsigned int version)
     std::string strHelper( handle.toCharString() );
     ar & make_nvp("swhandle_guid", strHelper);
     handle = strHelper.c_str();

I don't have access to the internal data of SWHandle, so I am trying
to work around that in the functions so that it work for both
serialization and deserialization (since I'm not aware of an easy way
to split them like you can the class version). The namespaces
shouldn't be an issue (in this case, everything is operating in the
global namespace). I'm not seeing any real difference between my
code and the


>Double check the example test_nonintrusive and compare it to your case.
>Check the following:
>a) const vs non const parameters
>b) unsigned vs int declarations for version
>c) namespace. Since vc 7.1 implements ADL its best for the specializations
>to be in the same
>namespace as the datatype being serialized.
>Robert Ramey
>"Jared McIntyre" <jmcintyre_at_[hidden]> wrote in message
>> I have a class that I am serializing using the non-intrusive method.
>> It serializes just fine, but when I code the input stream, the
>> compiler complains that the class doesn't implement the serialize
>> function (which is, of course, true since I'm am doing the
>> non-intrusive method on this class). Any idea what could be going
>> wrong? The class I'm wrapping is being serialized as part of another
>> class (if that helps at all).
>> Visual Studio 7.1
>> Boost 1.32.0 tar ball
>> Wide character XML output
> > Jared McIntyre

Boost list run by bdawes at, gregod at, cpdaniel at, john at