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

Allow variants of variants #1098

Closed
wants to merge 1 commit into from

Conversation

shiretu
Copy link

@shiretu shiretu commented Jun 13, 2024

No description provided.

@stephenberry
Copy link
Owner

Thanks for this, will have to check out why it isn't building later.

@shiretu
Copy link
Author

shiretu commented Jun 13, 2024

I see that is failing in some other places. In my use case, it works fine: I have 3 levels of variants. Yes, I know, it is not fine, but what can I do!? This is how the data is modelled from server side :(

@stephenberry
Copy link
Owner

I'll look into it when I have some time, I think it should be possible to get working.

@shiretu
Copy link
Author

shiretu commented Jun 13, 2024

Thank you! It would be very helpful.

@stephenberry
Copy link
Owner

There is a lot more to variant handling that this pull request tackles. I can see what you're trying to accomplish, and I'd like to get variants of variants working, but we need to look at all sub-variants and count the various types in each of the variants. A sub-variant may just have numerical types and therefore not contribute to the deduction map of the higher level variant, or it may just have one element that contributes.

I'm doing more work on variants now. I just added support for variants that contain std::shared_ptr and std::unique_ptr.

I'm going to close this pull request, but I appreciate a demonstration of your aim and will try to tackle this in a more robust manner.

Thanks!

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.

2 participants