Hello, I have a simple piece of code: void save_tbl (std::map<std::wstring, std::map<WORD, std::map<WORD, std::map<WORD, int> > > > & tbl) { std::ofstream ofs ("prj12_tbl.dat", std::ios::trunc | std::ios::binary ); boost::archive::binary_oarchive oa(ofs); assert (ofs.good()); oa << tbl; ofs.close(); }; Got this errors: c:/boost/boost/serialization/access.hpp: In static member function `static voidboost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::basic_string<wchar_t, std::char_tr aits<wchar_t>, std::allocator<wchar_t> >]': c:/boost/boost/serialization/serialization.hpp:81: instantiated from `void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::basic_string<wchar_t, std::char_traits<wchar_ t>, std::allocator<wchar_t> >]' c:/boost/boost/serialization/serialization.hpp:140: instantiated from `void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::basic_string<wchar_t, std::char_traits<w char_t>, std::allocator<wchar_t> >]' c:/boost/boost/archive/detail/oserializer.hpp:151: instantiated from `void boost::archive::detail::oserializer<Archive, T>::save_object_data(boost::archive::detail::basic_oarchive&, const void*) const [with Archive = boost::archive::binar y_oarchive, T = std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >]' collect.cpp:149: instantiated from here c:/boost/boost/serialization/access.hpp:109: error: 'struct std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >' has no member named 'serialize' So, is there wstring support for serialization, or I should write my own?
dennis@conus.info wrote:
c:/boost/boost/serialization/access.hpp:109: error: 'struct std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >' has no member named 'serialize'
So, is there wstring support for serialization, or I should write my own?
Hi Dennis, sure there is, did you include <boost/serialization/wstring.hpp>? Hope this helps, -- Christian Pfligersdorffer Software Engineering http://www.eos.info
participants (2)
-
dennis@conus.info
-
Pfligersdorffer, Christian