Add rfl::AddNamespacedTagsToVariants for rfl::Generic and same-name-different-namespace structs#494
Merged
liuzicheng1987 merged 5 commits intoSep 11, 2025
Conversation
to support use-cases with multiple `rfl::Generic` types in a single variant or where the same typename exists in multiple namespaces.
bryceschober
commented
Sep 9, 2025
Contributor
|
@bryceschober , other than the one comment I made, which you can basically just copy + paste, I like this very much. This is basically ready to be merged. |
Added test utility helpers for detailed CBOR encoding expectations, using the annotated hex format from https://cbor.me and other tools
Contributor
Author
|
@liuzicheng1987 I've implemented your requested I also added CBOR test coverage representative of our use-case, and using a new method of detailed CBOR test expectations that I think will be more practical going forward. It kinda sucks to depend on outside tooling like https://cbor.me, but it's also relatively easy to use and help connect the dots with the test failure formatter I implemented. |
Contributor
|
@bryceschober thank you! |
Contributor
|
Looks good to me, thanks for doing this work @bryceschober |
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.
As an alternative to #467, I offer this draft proposal.
Details:
rfl::AddNamespacedTagsToVariantsprocessor to support the usage ofrfl::Genericdirectly in auto-tagged variants.rfl::AddTagsToVariantsby adding a defaulted non-type template parameter torfl::VariantAlternativeWrapperOutstanding items:
AddTagsToVariants.hppandis_add_tags_to_variants_v.hppacceptable? Those files were named specifically matching the old processor, and now I've added to them.