Though this technically has a "valid" use-case (wherein a single event's data can take multiple forms), it is almost always better to use another enum for the metadata type instead of having two events using the same name.
This issue is resolved when the above code produces a compiler error. Obviously it is much more difficult to make separate macro invocations produce a compiler error together, even if they are using the same standard field value.
Output:
Though this technically has a "valid" use-case (wherein a single event's
data
can take multiple forms), it is almost always better to use another enum for the metadata type instead of having two events using the same name.This issue is resolved when the above code produces a compiler error. Obviously it is much more difficult to make separate macro invocations produce a compiler error together, even if they are using the same
standard
field value.