Boost logo

Boost Users :

Subject: [Boost-users] BOOST_CLASS_VERSION compiles on MSVC2005, but not on gcc
From: professor rumsdiegeige (professor_rumsdiegeige_at_[hidden])
Date: 2008-10-21 00:33:24


Hello,

I've got a problem using BOOST_CLASS_VERSION on gcc.

The following minimal code example

class CHeader : boost::noncopyable
{
public:
    CHeader() {PosX_ = 1.0;};

    friend class boost::serialization::access;
    template<class Archive> void serialize(Archive & ar, const unsigned int version)
    {
            ar & PosX_;
    };
    double PosX_;
};

works for me both on gcc and on MSVC2005. However, if I add

BOOST_CLASS_VERSION(CHeader, 1)

then the code only compiles on MSVC2005, but not on gcc. GCC complains about an incorrect syntax here, without being more specific.

What am I doing wrong?

Thank you for your help,
Regards
S. Lorentz

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



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