Boost logo

Boost Users :

Subject: Re: [Boost-users] splitting non intrusive serialization into save/load
From: Babineau, Denis (Denis.Babineau_at_[hidden])
Date: 2010-06-04 14:24:32


Thanks! split_free worked like a charm! I managed to find it in the documentation after reading your post; I was looking in the wrong sections (tutorials talked about split_member but not split_free which threw me off).

-----Original Message-----
From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Steven Watanabe
Sent: Friday, June 04, 2010 12:47 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] splitting non intrusive serialization into save/load

AMDG

Babineau, Denis wrote:
> error C2270: 'save' : modifiers not allowed on nonmember functions
>
> <snip>
>
> namespace boost { namespace serialization {
> template <class Archive>
> void save(Archive & ar, MyClass & c, const unsigned int version) const;
>

void save(Archive & ar, const MyClass & c, const unsigned int version);

> template <class Archive>
> void serialize(Archive & ar, MyClass & c, const unsigned int version)
> {
> boost::serialization::split_member(ar, c, version);
> }
> }}

Use split_free instead of split_member.

In Christ,
Steven Watanabe

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
CONFIDENTIALITY NOTICE: The contents of this email are confidential
and for the exclusive use of the intended recipient. If you receive this
email in error, please delete it from your system immediately and
notify us either by email, telephone or fax. You should not copy,
forward, or otherwise disclose the content of the email.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net