Serialization problem while using class template with template function
Dear everyone, I need to serialize a class like this: template<typename typename1, typename typename2=double> class test_mean { public: test_mean(){} typename1 typename1_type; typename2 typename2_type; private: std::vector<double> m_parameters; friend class boost::serialization::access; template<class Archive> void serialize(Archive & ar, const unsigned int version) { ar & boost::serialization::base_object<base_type>(*this); ar & m_parameters; } }; But I got trapped in the famous 'serialization trap' giving following error message (compilation is attempted using msvc 8.0 compiler): \boost_1_36_0\boost\iterator\iterator_adaptor.hpp(225) : error C2027: use of undefined type 'boost::STATIC_ASSERTION_FAILURE<x>' 1> with 1> [ 1> x=false 1> ] <cut> when I put struct parameters { double mean(const std::vector<double> &values) const { return ame::range::mean(std::make_pair(values.begin()+1, values.end()-1) | boost::adaptors::filtered(boost::math::isfinite<double>)); } }; in the typename1... Anyone can help me to fix this error? I attached the solution ( http://www.nabble.com/file/p19347724/jam_serialize.zip jam_serialize.zip ) along this message. Any guidance should be very helpful. Thank you!!! gatotkaca -- View this message in context: http://www.nabble.com/Serialization-problem-while-using-class-template-with-... Sent from the Boost - Users mailing list archive at Nabble.com.
participants (1)
-
gatotkaca