How to resolve this STL MAP problem in PowerGraph?

User 2745 | 1/10/2016, 6:00:57 AM

I need use STL-map to get a struct like:

class BIT { public: std::bitset<10> bt; void save(graphlab::oarchive& oarc) const { oarc<< bt; } void load(graphlab::iarchive& iarc) { iarc>> bt; } }; struct vd: graphlab::ISPODTYPE { std::map<int , BIT> test; void save(graphlab::oarchive& oarc) const { oarc<< test; } void load(graphlab::iarchive& iarc) { iarc>> test; } };

When I 'make' the program, the output is

oarchive.hpp:195:9: error: ‘const class std::bitset<10ul>’ has no member named ‘save’;

How to solve it??


User 1592 | 1/11/2016, 5:12:19 PM

I am not sure about your code, but ISPODTYPE means that this is a struct with primitive types and not a class with complex types like std::map. At any case your struct should not be ISPODTYPE.

User 2745 | 1/13/2016, 1:03:19 AM

Hi, Danny Thanks very much for your answer!!