-
Notifications
You must be signed in to change notification settings - Fork 26
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
Support for multiple identical types? #40
Comments
@AnthonyVH Thanks for your interest in variant-lite. I didn't have plans to support multiple identical types. I cannot answer the question what is preventing it now, although it may well have to do with what C++98 is capable of or not. It isn't likely I can, or choose to spend time on this any time soon I'm afraid. |
No worries. I messed around with the code a bit tonight and I think I it working like exactly like std::variant. I'll try to get the required macro and template mess cleaned up and create a pull request. |
Just to be sure: Something I sometimes forgot myself ;) |
Thanks for merging this in! I just noticed that I forgot to update the readme though, that still says all types must be different. Do you want to change this, or shall I create a new pull request? |
You're welcome :) Having a look at the old requirement of different type did cross my mind, but didn't follow through. I'll take care of it. |
The current implementation of variant-lite does not support multiple identical types (i.e.
nonstd::variant<int, int>
). On the other hand, this works perfectly fine in C++17'sstd::variant
.Are there any plans to support this as well in variant-lite? If so, what exactly prevents it from working right now? I can't think of a technical issue implementing this in C++11, but I have no clue about C++98.
The text was updated successfully, but these errors were encountered: