Hi all, with Boost 1.3.5 and g++ 4.2.1 on Linux I get the following compile error from one of the Boost headers:
boost/serialization/utility.hpp:48: error: expected template-name before ‘<’ token
boost/serialization/utility.hpp:48: error: expected `{' before ‘<’ token
boost/serialization/utility.hpp:48: error: expected unqualified-id before ‘<’ token
boost/serialization/utility.hpp:50: error: extra ‘;’
I am trying to serialize a map like so:
#include
using std::map;
struct Resource {
enum ID {
CPU = 0,
RAM,
TMP,
PRMAN
};
static const char* const name[];
};
class ResourceSet {
private:
typedef uint16_t Tally;
typedef Resource::ID RID;
map m_resources;
private:
friend class boost::serialization::access;
template<class Archive>
void serialize (Archive &p_ark, const unsigned int p_version);
};
template<class Archive>
void
ResourceSet::serialize (Archive &p_ark, const unsigned int p_version)
{
p_ark & m_resources;
}
So I am wondering why the compiler is spitting out this error? Is this a bug or is this because of the typedefs? Line 48+ from utility.hpp is this:
/// specialization of is_bitwise_serializable for pairs
template
struct is_bitwise_serializable >
: public mpl::and_
{
};
} // serialization
} // namespace boost
Regards,
Jim Vanns
--
James Vanns
Systems Programmer
Framestore CFC Ltd.