2

I encountered these message when trying to use boost::serialization. However I don't what did I do wrong. Would you please help point it out?

Thank you,

Error message:

    boost/include/boost/archive/detail/check.hpp:162: error: invalid application of 'sizeof' to incomplete type 'boost::STATIC_ASSERTION_FAILURE<false>'

Below is my code:

    template<class Archive>
    void nDB::serialize(Archive &ar, const unsigned int version) {
    boost::unordered_map<string,macro*,myhash,cmp_str>::const_iterator M_IT;
    boost::unordered_map<string,layer*,myhash,cmp_str>::const_iterator L_IT;
    for (M_IT = _MACROS.begin();M_IT != _MACROS.end();M_IT++) {
     ar & M_IT->first;
     ar & *(M_IT->second);

    } 
    for (L_IT = _LAYERS.begin();L_IT != _LAYERS.end();L_IT++) {
      ar & L_IT->first;
      ar & *(L_IT->second);
    }
    } 
Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
Binh Van Pham
  • 111
  • 10

0 Answers0