-
Notifications
You must be signed in to change notification settings - Fork 450
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
Associative container mapper example #57
Comments
I will check this now. |
Thank you very much! |
Unfortunately QHash is not fully STL compatible from the interface.
What is missing here, is the handling of the constness of the container. You should not be able to remove or insert items in a const container. I have to think about it, to make specialization more easily.... |
I run a few tests, and it seems to work flawlessly! However, I had to change the functions get_key() and get_value() as follows (or I get the error
Would you like me to provide a pull request which shows the working code as an example in the docs? |
Ahh I forgot the namespace Anyway, I working on a branch to get your custom types more easily into the mapper. |
Ok, then. Thank you very much! |
I am done. Please test it. There is also no additional drawback with my approach, actually I improved the performance a little bit. REMARK |
Beautiful! And much easier to implement. Thank you very much! |
I am experimenting with the new associative_container_view, which I find great. Now trying to "map" non-STL types in order to use them with RTTR, but the documentation is still sketchy.
Since no example is provided, I put together one here for Qt's QHash. I think I got pretty close to the "working" implementation, but it still crashes in some cases. I could use some help in debugging this. If found suitable, I would be glad to see it included in the docs.
The text was updated successfully, but these errors were encountered: