Boost logo

Boost Users :

Subject: [Boost-users] Persisting __int64 (or long long) with boost::serialization?
From: Sandy Walsh (swalsh_at_[hidden])
Date: 2009-05-19 16:42:34


Hi,

Sorry for the n00b question, but I'm trying to serialize some unsigned
__int64 member variables using boost::serialization.

I added the following to my header:

namespace boost
{
    namespace serialization
    {
        template<class Archive>
        void load(Archive & ar, unsigned __int64& big, const unsigned
int version)
        {
            size_t size = sizeof(big);
            ar.load_binary(&big, size);
        }

        template<class Archive>
        void save(Archive & ar, unsigned __int64 big, const unsigned int
version)
        {
            ar & sizeof(big);
            ar.save_binary(&big, sizeof(big));
        }
    }
};

But the compiler still complains that it doesn't know how to handle that
right-hand operand.

Is there something obvious here I'm missing?

Thanks
-S


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