Binary Object Serialization (Traversal & Reconstruction with Circular References)

Speaker: Chris Ryan

Audience level: [ Intermediate ]

This talk will describe a minimally intrusive technique to add serialization to a set of classes, traversing the hierarchical data, persisting in a binary format and dynamic reconstruction

When storing, it can deduce the data types using Template Argument Deduction (TAD).

When loading, it uses a homebrew reflection technique for dynamic object creation. Reflection as a language feature will be unavailable until at least C++26. This serialization technique can dynamically recreate a persisted complex data structure/structure network. This is a platform agnostic technique. Not everybody is yet able to migrate to C++20, so this is using a C++14 compliant SFINAE/std::enable_if<> mechanism. We will also explore optimizations and what it takes to convert this technique to use C++20 concepts.

Category: Metaprogramming and Tooling/Utilities