-
Notifications
You must be signed in to change notification settings - Fork 46
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
Use template instead of unordered_map in imap::put_all #1218
Comments
Hello @ldrozdz93 Yes, i think it makes sense. You are going to generalize the usage which would also cover the existing API Please go ahead and submit the PR. Thanks for the contribution. |
One detail before I proceed:
Just to make sure what we mean by that exactly. Imagine the following class:
Should the template In other words, should anything convertible to I think we should pick the former (full backwards compatibility), but I'd like some confirmation before I dive into SFINAE complexity etc. |
Please look at the impl. at here. As you see, as long as we can iterate the container and the entry has the I would imagine the API would be something like this:
|
For not breaking existing user code, all our existing tests which use |
Thanks, so I'll use the current test cases as a reference, without coming up with any new cases of what backwards compatibility should mean. |
Please do not forget to put the documentation update and the code examples update. |
Hi,
The member function
hazelcast::client::imap::put_all
is constrained to use astd::underdered_map
as the input values. The user might want to use a more cache-friendly alternative, likeboost::unordered_flat_map
orstd::flat_map
, or maybe astd::vector<std::pair<...>>
for some specific reasons.Question:
Could I add such template
put_all
support? I could implement that and submit a PR, but I need any confirmation from anybody responsible for this repo, that it would actually make sense and there are people here that would review and be interested in merging it, so that my time is not actually wasted :)Best regards,
Łukasz
The text was updated successfully, but these errors were encountered: