Interesting - is there a type safe way to do this? vector<variant<>>? and/or a custom “vector allocator” to hide the details?
I have not been working (yet) on custom allocators, but that's on the roadmap: https://pagghiu.github.io/SaneCppLibraries/library_container...
(Not really a c++ expert, but that's my understanding; someone more knowledgeable can correct me).