
Robert Ramey wrote
You really need to think about what void * means in your program. Usually it's just a place holder for any kind of pointer. Maybe you want to consider using boost::any instead of void *, (I don't know if serialization has been implemented for boost::any) or perhaps boost::variant which DOES have serialization implemented.
Robert Ramey _______________________________________________ Boost-users mailing list Boost-users@.boost http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi,Robert Ramey.I come back,when I discover about the boost::variant,I find it cannot satisfy my request. And finally I use vector to solve it,with the thinking that vector can store memory.Cheers! That's what I want to share,and maybe it's helpful to someone who want to store a sequence raw data with serialization. I create a vector like: Engine::Uint8Vector dataVec((sizeof(type) / sizeof(Engine::Uint8Vector::value_type)) * indexCount); and then when I need the data to read or modify,just : type * data = reinterpret_cast<type *>(dataVec.data()); p.s:Sorry for using reinterpret_cast,but I cannot have a better idea here. It solved what I need.Maybe it's a so simple method,but it's useful. :) Thanks again for this great lib. Harry -- View this message in context: http://boost.2283326.n4.nabble.com/serialization-1-49-How-to-serialize-share... Sent from the Boost - Users mailing list archive at Nabble.com.