-
Notifications
You must be signed in to change notification settings - Fork 1
Containers #2
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
Containers #2
Conversation
* magic_enum: make streams optional this commit adds support to disable streams with macro MAGIC_ENUM_NO_STREAMS * magic_enum_format: add support to disable exceptions this commit adds support to disable exceptions with macro MAGIC_ENUM_NO_EXCEPTIONS
Okay, I have fixed that std::get issue, so the current status is a working test case for magic_enum::containers::array, and I'll go on with set and others. Known issues of the array:
|
Okay, the bitset test is done. set also, but will not compile on Visual Studio 2019 and 2022, because he cannot create an Iterator to insert. I'll try to fix that but also writing some documentation now. Maybe you have a tip for a solution for that build: https://github.com/florianbecker/magic_enum/actions/runs/3536735226 |
So, I think this self code-review comment must be solved. |
I have fixed the containers::set issue, but I do not have the time to fix Neargye#187 (comment). So the status is a working containers::set test. For containers::flat_set there are more issues for me. Constexpr will tell me something like: This will not end in a constant result. Also, begin and end may have a few issues as well - but here is also the issue with my time. I do not have an idea to fix that, nor how a flat_set is working, so this task is the earliest inspection from me in 2023. Missing tasks are documentation work now. Maybe I have some time to finish this as well in the next few days. To bring this merge on its way, I would suggest removing the flat_set - this is not useful for anyone currently, and writing a new issue for this. Please let me know if I should remove this for this merge. |
@florianbecker It can be skipped the flat_set for this PR. You can comment out that parts of the code. |
Documentation is done, some basic examples are done, and tests are also done. flat_set is commented out. It is useable, but I think there is a lot of work to do in near future. Let me know, what changes have to be made by a full review from you. |
I don't have time to review the code here. I merge this, and we can continue the review in Neargye repo |
I'm not done in any case because there are too many issues and questions!
I have done a lot of things:
So, as mentioned here:
Neargye#187 (comment)
Please provide me with all your known use cases.
Known Bugs:
Sorting the magic_enum::array will break the integrity - so we need to make the sort unworkable or make the kind useable.
std::get will become ambiguous on msvc2019 if you use the same index and an enum_value in the same scope.
For my current work, there is an error with set.insert and emplace on msvc - others will work.
And for me, I missed some operator or function to return the std::container for comparing in that case.
We need to discuss how useful is set, bitset, and flat_set, because I do not find them helpful yet... but hopefully, with your provided cases or intention.