Add enchantum as an enum reflection backend (#441)

---------

Co-authored-by: Dr. Patrick Urbanke <patrick@getml.com>
This commit is contained in:
ZXShady
2025-05-29 23:16:59 +02:00
committed by GitHub
co-authored by Dr. Patrick Urbanke
parent 3b6a3bb3c7
commit 750e67d630
36 changed files with 1959 additions and 441 deletions
+4 -1
View File
@@ -8,14 +8,17 @@
namespace test_enum {
enum class Color { red, green, blue, yellow };
enum Location { left, centre, right }; // Unscoped enum
struct Circle {
float radius;
Color color;
Location location;
};
TEST(generic, test_enum) {
const auto circle = Circle{.radius = 2.0, .color = Color::green};
const auto circle =
Circle{.radius = 2.0, .color = Color::green, .location = centre};
write_and_read(circle);
}