
The following still fails to compile: ----- #include <boost/serialization/map.hpp> ----- With these error messages: v:\Src\Lib\boost\serialization\tracking.hpp(50) : error C2065: 'is_pointer' : undeclared identifier v:\Src\Lib\boost\serialization\tracking.hpp(66) : see reference to class template instantiation 'boost::serialization::tracking_level<T>' being compiled v:\Src\Lib\boost\serialization\tracking.hpp(50) : error C2974: 'boost::mpl::eval_if' : invalid template argument for 'C', type expected v:\Src\Lib\boost\mpl\eval_if.hpp(44) : see declaration of 'boost::mpl::eval_if' v:\Src\Lib\boost\serialization\tracking.hpp(64) : error C2977: 'boost::mpl::eval_if' : too many template arguments v:\Src\Lib\boost\mpl\eval_if.hpp(44) : see declaration of 'boost::mpl::eval_if' v:\Src\Lib\boost\serialization\tracking.hpp(64) : error C2059: syntax error : '>' v:\Src\Lib\boost\serialization\tracking.hpp(64) : error C2039: 'type' : is not a member of 'operator``global namespace''' v:\Src\Lib\boost\serialization\tracking.hpp(64) : error C2238: unexpected token(s) preceding ';' v:\Src\Lib\boost\archive\basic_archive.hpp(21) : fatal error C1189: #error : "no serialization headers my precede any archive headers" Robert Ramey wrote:
There should be no need to include the first header in user code. In spite of its name, its really and implementation file. perhaps later well move it to a better place.
Robert Ramey
Zrubavel Zodikovich wrote:
The following code produces error saying that archive is included after serialization. What is the correct place to include map.hpp and other predefined implementations when making a class with container members serializable ?
a.h ----- #include <boost/serialization/serialization.hpp> #include <boost/serialization/map.hpp>
class A { public:
template<class Archive> void serialize(Archive & ar, const unsigned int version) { ar & someMap; }
std::map<int, int> someMap; }; -----
Thanks