Sorry, I accidentaly edited that part out when posting. The whole struct look like this:


#include "common.h"
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>

struct Particle {
    EIGEN_MAKE_ALIGNED_OPERATOR_NEW
    V3D    r, u;
    double m, q, igamma;
    double qm;  // = q/m
    unsigned number;

    friend class boost::serialization::access;
    template<class Archive>
    void serialize(Archive & ar, const unsigned int file_version) {
        ar & r;
        ar & u;
        ar & m;
        ar & q;
        ar & igamma;
        ar & qm;
        ar & number;
    }
};