flatten 20260225

This commit is contained in:
Timothy Prepscius
2026-02-25 12:41:23 -05:00
commit d33ec72fa2
43 changed files with 3296 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
#pragma once
#include "VariantIO.hpp"
namespace tjp {
namespace core {
namespace variant {
struct VariantSerialization
{
typedef std::vector<char> Block;
Type_ type;
Block block;
VariantSerialization() {}
template<typename IO>
VariantSerialization(const Variant &v, IO &io)
{
auto &v_ = const_cast<Variant &>(v);
auto io_ = io.partial();
VariantIO vio{ v_.type, v_ };
io_.object("type", v.type, "value", io_.custom(vio));
type = v.type;
block = io_.partial_serialization();
} ;
} ;
} // namespace
} // namespace
} // namespace