C++11 Header-only generic binary-serialization for arbriray types (and nested containers)
Header-only library to ease binary serialization.
Essentially, these lines should sum up the purpose of this library:
// open ofstream as binary ...
// save arbitraty container or fundamental type to it:
list<vector<map< string, unsigned >>> foobar;
save(ofstream_binary, foobar);
// a little later... load the container back in:
auto barbaz = load< list<vector<map< string, unsigned >>> >( ifstream_binary );
See the test cases for more examples.
include
the header file- Compile your executable/library with
-std=c++11
- (this is a C++11-only header, making heavy use of template meta-programming and C++11-type_traits)
Run rake clobber; rake
A lot of inspiration (and a mediocre-sized bit of code) was taken from http://flamingdangerzone.com/. This is an absolutely worth reading, and very enlightening. Great work!
WTFPL