Repository navigation
Add rfl::EnumNames<E> wire-name overrides, TransformEnumNames processors, and literal_from_table_t - #123
Closed
clockblocker wants to merge 2 commits into
Closed
Add rfl::EnumNames<E> wire-name overrides, TransformEnumNames processors, and literal_from_table_t#123clockblocker wants to merge 2 commits into
clockblocker wants to merge 2 commits into
Conversation
…ASCII snake_to_camel, normalize ParserEnum/enums template args, docs & tests
clockblocker
added a commit
that referenced
this pull request
Nov 28, 2026
…ocessor and sync nested EnumNames Adds rfl::DefaultTag<_discriminator, _default_tag> to fall back to a compile-time validated tag when a TaggedUnion's discriminator field is absent from the input object (while still rejecting present non-string or unknown tags, preserving NoExtraFields/NoDuplicateKeys, supporting multiple discriminators, and working with FlattenedTaggedUnionParser). Also syncs PR #123's recursive nested Processors<...> traversal into EnumNames.hpp. Motivated by NVIDIA/cuda-quantum (cudaq/lib/Target/Yaml/TargetConfigSchema.cpp L36-40, which had to pull in <yaml-cpp/yaml.h> manually to inject version: "1" on unversioned configs).
This was referenced Nov 29, 2026
Owner
Author
|
Superseded by split queue PRs on the PR-keyed upstream queue (#209):
Closing this bundled PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds opt-in enum wire-name customization via
rfl::EnumNames<E>andrfl::TransformEnumNames<...>processors across JSON, YAML, XML, Generic, CLI, and JSON Schema — avoidingrfl::Literal<...>duplication or hand-writtenrfl::Reflector<E>adapters. Default enum serialization is unchanged.Example
Key details
EnumSnakeCaseToKebabCase,EnumSnakeCaseToCamelCase,EnumSnakeCaseToPascalCase,EnumToLowerCase,EnumToUpperCase(locale-independent ASCII transforms, composable inside nestedrfl::Processors<...>).rfl::EnumNames<E>supports per-enumeratoroverrides(static contiguous range or borrowed-range function, including out-of-range enumerators) and customtransformcallables; also addsrfl::get_enum_wire_names<E, Ps>()andrfl::literal_from_table_t<kTable>.<EnumType, EnumNameTransform>to avoid per-ProcessorsTypetemplate bloat.NVIDIA/cuda-quantum's 4 hand-writtenReflector<E>specializations forsnake_case→kebab-caseYAML enums; documented indocs/content/enums.mdandprocessors.md.AI-authored.