#include #include #include #include #include #include #include "write_and_read.hpp" // Makes sure that we can set default values. void test_variant() { std::cout << "test_variant" << std::endl; struct Circle { rfl::Field<"radius", double> radius; }; struct Rectangle { rfl::Field<"height", double> height; rfl::Field<"width", double> width; }; struct Square { rfl::Field<"width", double> width; }; using Shapes = std::variant>; const Shapes r = Rectangle{.height = 10, .width = 5}; write_and_read(r, R"({"height":10.0,"width":5.0})"); }