Serialize map/vector for VC7.0
Dear all I am using vc7.0 and learning how to use Boost.Serialization. I face to a problem about serializing the member std::vector<int *> m_vpInt; let me state more. vc7.0 can support rtti, so I use no_rtti. I found an example to use no_rtti (test_no_rtti.cpp). std::vector<std::string> m_vsStr; std::vector<polymorphic_derived1 *> m_vpD1; Both m_vsStr and m_vpD1 can be serialized, but m_vpInt can't what should I do to serialize the member, m_vpInt? I found from the web serialization document : http://www.boost.org/libs/serialization/doc/index.html Is it related to my modification, especially the following last point ? Visual C++ 7.0 * The "pimpl" demo fails to link. Cause and workaround for this is unknown * XML serialization only works with version 1.6x of spirit. In order to build and use this library with this compiler, one must use version 1.6x rather than the latest version shipped with boost. See Release Notes. * This compiler does not support partial template specialization. The implementation of the new shared_ptr serialization depends upon compiler support for partial template specialization. This compiler doesn't implement this feature. In order to serialize shared_ptr<A>, invoke the macro BOOST_SERIALIZATION_SHARED_PTR(A) in the header code. * Lack of support for partial template specialization also creates problems for serialization of std::map. In order to serialize instances of this type include the invocation of BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION for the key type of the map. Best Regards Barr Ng _________________________________________________________________ No masks required! Use MSN Messenger to chat with friends and family. http://go.msnserver.com/HK/25382.asp
participants (1)
-
Ng Pan