Consider enum values when computing protocol hash

This commit is contained in:
Guillaume Meunier
2026-07-26 21:15:22 +02:00
parent 66a2ffda82
commit b33de5ef4b
2 changed files with 23 additions and 0 deletions
+8
View File
@@ -51,4 +51,12 @@ struct test
float y;
};
static_assert(serialization_type_hash<test>(0) == hash("structure{int32,float32}"));
enum test_enum : uint32_t
{
foo,
bar,
foobar = 42
};
static_assert(serialization_type_hash<test_enum>(0) == hash("enum32{foo=0,bar=1,foobar=42}"));
} // namespace