Boost logo

Boost Users :

Subject: [Boost-users] [Serialization] Non-default constructor and template class
From: Mccall, Kurt E. (JSC-EG411) (kurt.e.mccall_at_[hidden])
Date: 2015-06-15 15:38:59


I am attempting to serialize a template class without a default constructor, so I am overriding boost::serialization::save_construct_data().
I'm not sure of the correct syntax to declare that function. The line marked below fails to compile with a "too many template-parameter-lists"
error.

// Forward declaration of my class
template<class Key, class Value, class Hasher>
     class HashMap;

namespace boost { namespace serialization {

template<class Archive>
    template<class Key, class Value, class Hasher>
        void save_construct_data(Archive &ar, const HashMap< Key, Value, Hasher > *t, const unsigned int file_version); // error here
}}

Thanks for any help,
Kurt



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net