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


I've got a problem using BOOST_CLASS_VERSION on gcc.

The following minimal code example

class CHeader : boost::noncopyable
    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


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,
S. Lorentz

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at