I am trying to serialize the following user-defined object:
ConcatConstMapping<std::multiplies<double> >* obj;
Boost shows me the following error:
> /usr/include/boost/serialization/access.hpp:118:9: error: ‘struct
> std::multiplies<double>’ has no member named ‘serialize’
This is how class ConcatConstMapping
looks like:
template<class Operator>
class ConcatConstMapping: public ConstMapping
{
protected:
typedef std::pair<Dimension, Argument::const_iterator> DimIteratorPair;
typedef std::list<ConstMapping*> MappingSet;
MappingSet mappings;
ConstMapping* refMapping;
bool continueOutOfRange;
Argument::mapped_type oorValue;
Operator op;
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive & archive, const unsigned int version)
{
archive & mappings;
archive & refMapping;
archive & continueOutOfRange;
archive & oorValue;
archive & op;
}
};
Edit: The error is gone when I comment line archive & op;
. But I fill I need to add that line too for serialization.