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

Add constant primitives #8439

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cc2b
Copy link

@cc2b cc2b commented Nov 10, 2024

Add constant primitives within a schema.

e.g. const SOME_CONSTANT_FLOAT: float = 1.0;

Notes

  • Constants in generated code is only supported for C++.
  • Supports only scalar constants (no string).
  • Can be used for default values, fixed-array size, and other constants.
  • Description of the feature is added to the documentation.
  • Related discussion

support array length, default values, and constant primitive initialization

fixup! feat: add constant primitives

fixup! feat: add constant primitives
to include constant primitives
@github-actions github-actions bot added c++ codegen Involving generating code from schema documentation Documentation labels Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ codegen Involving generating code from schema documentation Documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant