Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider to import all tag enumeration values into the choice class #63

Open
mikir opened this issue Dec 17, 2024 · 0 comments
Open

Consider to import all tag enumeration values into the choice class #63

mikir opened this issue Dec 17, 2024 · 0 comments
Milestone

Comments

@mikir
Copy link
Collaborator

mikir commented Dec 17, 2024

Example of the current solution for choices:

zserioChoice.emplace<ConditionValue::Tag::CHOICE_dateRangeOfYear>(computeDateRangeOfYear(value));

Idea is to import all choice tag enumeration values directly into the choice class to simplify the previous example to:

zserioChoice.emplace<ConditionValue::CHOICE_dateRangeOfYear>(computeDateRangeOfYear(value));

However, this will introduce the clashes with the choice keywords (e.g. Base) and with the variant base class keywords (e.g. index). These clashes must be carefully solved. It is not acceptable just to forbid field names like index in the schema.

Reported by @reinco.

@mikir mikir added this to the Backlog milestone Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant