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

Remove constexpr requirement for glz::schema fields & cleaned JSON schema code #1518

Merged
merged 11 commits into from
Dec 23, 2024

Conversation

stephenberry
Copy link
Owner

No description provided.

@stephenberry stephenberry changed the title Cleanup Remove constexpr requirement for glz::schema fields and cleanup JSON schema code Dec 20, 2024
@stephenberry
Copy link
Owner Author

@jbbjarnason, since you helped so much with this, I wanted to let you know that I've dropped the constexpr construction requirement on glz::schema, this means that we can now use std::vector rather than std::span and it makes including examples and other unknown array length fields easier.

@stephenberry stephenberry changed the title Remove constexpr requirement for glz::schema fields and cleanup JSON schema code Removed constexpr requirement for glz::schema fields and cleanup JSON schema code Dec 20, 2024
@stephenberry stephenberry changed the title Removed constexpr requirement for glz::schema fields and cleanup JSON schema code Removed constexpr requirement for glz::schema fields and cleaned JSON schema code Dec 20, 2024
@stephenberry
Copy link
Owner Author

stephenberry commented Dec 20, 2024

Hmm, I'm not sure why GCC is failing this when clang works.
Edit: It turns out GCC doesn't properly instantiate a global inline const value if it is not constexpr. The solution is to make a static value at the call site.

@stephenberry stephenberry changed the title Removed constexpr requirement for glz::schema fields and cleaned JSON schema code Remove constexpr requirement for glz::schema fields and cleaned JSON schema code Dec 23, 2024
@stephenberry stephenberry changed the title Remove constexpr requirement for glz::schema fields and cleaned JSON schema code Remove constexpr requirement for glz::schema fields & cleaned JSON schema code Dec 23, 2024
@stephenberry stephenberry merged commit 4a69caf into main Dec 23, 2024
12 checks passed
@stephenberry stephenberry deleted the cleanup branch December 23, 2024 16:11
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

Successfully merging this pull request may close these issues.

1 participant