2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-30 20:02:12 +00:00

Don't try to use the serialization library on GCC 2.95.3

[SVN r32274]
This commit is contained in:
Douglas Gregor
2006-01-10 13:43:38 +00:00
parent c668929a24
commit e96148194d

View File

@@ -7,11 +7,14 @@
#define BOOST_PROPERTY_HPP
#include <boost/pending/ct_if.hpp>
#if ! BOOST_WORKAROUND (__GNUC__, < 3)
// Wierd, I get compilation errors if the following include is
// removed, but it shouldn't be needed. Some kind of strange
// include dependency in the serialization library.
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/base_object.hpp>
#endif
namespace boost {
@@ -22,8 +25,10 @@ namespace boost {
enum { num = 0 };
typedef void kind;
#if ! BOOST_WORKAROUND (__GNUC__, < 3)
template<class Archive>
void serialize(Archive & ar, const unsigned int version) { }
#endif
};
template <class Tag, class T, class Base = no_property>
struct property : public Base {
@@ -38,11 +43,15 @@ namespace boost {
property(const T& v) : m_value(v) { }
property(const T& v, const Base& b) : Base(b), m_value(v) { }
// copy constructor and assignment operator will be generated by compiler
#if ! BOOST_WORKAROUND (__GNUC__, < 3)
template<class Archive>
void serialize(Archive & ar, const unsigned int version) {
ar & boost::serialization::base_object<Base>(*this);
ar & m_value;
}
#endif
T m_value;
};