
Matthias Troyer wrote:
On Dec 29, 2005, at 4:31 PM, Douglas Gregor wrote:
On Dec 23, 2005, at 12:10 AM, nitin motgi wrote:
Is there something in the pipeline for BCCL to validate the serialization concept.
I don't know of anyone planning to do this, but it would be a great addition to the concept checking library.
The serialization concept might be a bit harder to validate than it seems initially, since there are various ways how serialization can be implemented. The ways that come to my mind (skipping over types directly supported by the library):
- a serialize member function - a serialize free function - load_construct_data and save_construct_data functions for types without a default constructor, or types containing reference members
Only required of types to be serialized via pointers.
- a save_override or load_override function in the archive class
Now that I think about it one can add - types marked as "primitive" with save/load functions in the archive class(s). BUT - To be of value, the "serializable" concept has to be definable independently of an archive class. This isn't that easy either as the set of "primitive" types will a vary depending on the compiler/library environment. - compositions of other serializable types. E.G. nvp<T> is serializable if and only if T is a serializable type. Collections of serializable types would fall into this catagory as well.
Before working on this, it would be best to formalize the concepts. Robert has recently improved the archive concepts, and they could be taken as a starting point for concept checking on archives. The formal concepts for serializable types are, have far as I know, not been sufficiently formalized yet.
Matthias
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost