I have a func which returns a const& to an Object. Let say,
class Y {
private:
Id id;
public:
Id const& GetId() const;
}
Now this Y Object is part of another class, let say class X, which needs to be serialized by boost.
class X {
template <class Archive>
void serialize(Archive& ar, uint32 version)
{
ar & y->GetId();
}
Y y;
}
However, boost complains about this and gives error:
error C2027: use of undefined type 'boost::STATIC_ASSERTION_FAILURE<x>'
C:\Users\Y.h(580) : see reference to function template instantiation 'Archive &boost::archive::detail::interface_iarchive<Archive>::operator &<const Id>(T &)' being compiled
with
[
How can I serialize the Id?