boost serialization std::unique_ptr support
Does the boost serialization library support serialization of std::unique_ptr? I tried to compile the code below, but if I include the boost::archive::text_oarchive oa(ofs); oa << g; line, the compiler (btw gcc4.7 with -std=c++11 flag) throws an error /usr/include/boost/serialization/access.hpp:118:9: error: ‘class std::unique_ptr’ has no member named ‘serialize’ #include <iostream> #include <memory> #include <fstream> #include <boost/archive/text_oarchive.hpp> #include <boost/archive/text_iarchive.hpp> class MyDegrees { public: void setDeg(int d){deg = d;} int getDeg()const {return deg;}