
28 Sep
2004
28 Sep
'04
8:57 a.m.
I've a class like this: class Example{ int str[BSize]; int *p; }; Where p points to next available element (p==str+BSize is possible when it is full). I.e. str is like begin() and p is like end(). I want to add a serialize() function, something like this: template<class Archive> void serialize(Archive &ar,const unsigned int){ ar & BOOST_SERIALIZATION_NVP(buf,p); } but there seems to be no support for buffers like this? For the moment I've implemented using separate load/save functions, where save writes the buffer size and load starts by reading it. While much simpler than the load/save code I'm replacing, the above 1-liner is even more appealing. Darren
7563
Age (days ago)
7563
Last active (days ago)
0 comments
1 participants
participants (1)
-
Darren Cook