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

glz::meta keys for enums, removing nameof ADL and enum_macro.hpp #1297

Merged
merged 8 commits into from
Sep 16, 2024

Conversation

stephenberry
Copy link
Owner

@stephenberry stephenberry commented Sep 13, 2024

Breaking Change of glz::nameof enum interface

The typical use case of glz::enumerate within a glz::meta has been unaffected, and therefore most users will be unaffected by this change.

This update removes the enum_macro.hpp header (GLZ_ENUM and GLZ_ENUM_MAP) and adds a new glz::meta approach that takes an array of keys and an array of values. This keys/values approach only supports enums in Glaze (currently to support faster internal compilation of enums), but broader support can be added in the future.

The enum_macro approach of using ADL created issues with other repositories that would declare a namespace nameof, and the macro expansion increased compilation time and was not a good, generic solution.

@stephenberry stephenberry merged commit 33a2ba3 into main Sep 16, 2024
14 checks passed
@stephenberry stephenberry deleted the meta_keys branch September 16, 2024 15:37
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