Actually use a tagged union

This commit is contained in:
Patrick Urbanke
2023-10-02 22:49:17 +02:00
parent 34d712bfc7
commit ee67e8750a
+1 -1
View File
@@ -28,7 +28,7 @@ void test_tagged_union() {
rfl::Field<"width", double> width;
};
using Shapes = std::variant<Circle, Square, Rectangle>;
using Shapes = rfl::TaggedUnion<"shape", Circle, Square, Rectangle>;
const Shapes r = Rectangle{.height = 10, .width = 5};