Thank you, George and Krzysztof. The reason I asked about this is that I’m
getting an error when trying to implement serialize into my class, and I thought
this was due to the serialize template only being in one of the serialization
libraries, thinking they all had different functions. The error I get is:
C:/boost_1_54_0/boost/serialization/access.hpp:118: undefined reference to
`void
boinc::work::Sudoku::serialize<boost::archive::binary_oarchive>(boost::archive::binary_oarchive&,
unsigned int)'
Googling the error, I found this link:
Which mentions putting the definition into the header, which I’ve tried,
but I still get the same error. So given the following code, can anyone tell me
what I’m doing wrong?
#ifndef SUDOKU_HPP_
#define SUDOKU_HPP_
#include <boost/archive/binary_oarchive.hpp>
#include <boost/archive/binary_iarchive.hpp>
namespace boinc {
class Sudoku {
friend class
boost::serialization::access;
private:
template<class Archive> void serialize(Archive &ar, const unsigned int
version) {
...
}
};
}
}
#endif
I have been following the serialization tutorial here:
And I don’t see any difference between my code and the code in the
documentation, besides the archive inclusions.
Sent: Wednesday, October 09, 2013 3:43 PM
Subject: Re: [Boost-users] How to choose which library version to
choose?
_______________________________________________
Boost-users mailing
list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users