How to use boost serialization and standard arrays?

I've spent quite a bit of time searching and reading, but I can't understand
why the following is happening.
Given a simple function:
(non-boost headers)
.
.
.
#include
This group of headers includes templates which implement serialization for Standard Library or Boost Library templates. Any program which uses these templates can invoke serialization of objects of these types just by including the corresponding header.
But it seems that including

D. R. Evans wrote:
I've spent quite a bit of time searching and reading, but I can't understand
why the following is happening.
Given a simple function:
(non-boost headers)
.
.
.
#include
This group of headers includes templates which implement serialization for Standard Library or Boost Library templates. Any program which uses these templates can invoke serialization of objects of these types just by including the corresponding header.
But it seems that including
_________________________________
#include
Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

#include
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Robert Ramey said the following at 12/29/2012 10:04 PM :
#include
is designed to permit the following:
void archive_data(void)
{ ofstream ofs(context.archive_name()); boost::archive::binary_oarchive ar(ofs);
int test[10] ar << test; }
Really??! Sheesh! I wish it had said that in the documentation instead of what it does say:
This group of headers includes templates which implement serialization for Standard Library or Boost Library templates. Any program which uses these templates can invoke serialization of objects of these types just by including the corresponding header.
That sure makes it sound like it's supposed to work with Standard Library arrays... which was why I spent a bunch of time trying to figure out what I was doing wrong before finally coming here. I even looked briefly at the header file, and I didn't see any comment there to the effect of: "this is designed for C-style arrays, not Standard Library array containers".
I don't know if anyone has implemented serialization for boost::array or std::array.
OK; I'll just iterate and serialize the individual components myself. Thank you for taking the trouble to reply; I appreciate it. Doc -- Web: http://www.sff.net/people/N7DR
participants (2)
-
D. R. Evans
-
Robert Ramey