Add support for other types than just vector#15
Merged
jesperkdab merged 1 commit intomainfrom Oct 11, 2022
Merged
Conversation
dangelog
reviewed
Sep 14, 2022
d845a6e to
e3c6069
Compare
dangelog
reviewed
Sep 27, 2022
| #include <set> | ||
| #include <unordered_map> | ||
| #include <unordered_set> | ||
| #include <vector> |
There was a problem hiding this comment.
You can drop all these includes?
Also you shouldn't be including experimental traits...
3c15123 to
118f4ba
Compare
dangelog
approved these changes
Oct 6, 2022
|
|
||
| ``` | ||
| std::map<int, std::string> map{{1, "abc"}, {2, "def"}, {3, "hij"}, {4, "klm"}}; | ||
| auto doubleKeys = [](const auto& &item) { |
| template <typename Container> | ||
| auto insert_wrapper( | ||
| Container &c, | ||
| std::enable_if_t<std::experimental::is_detected_v<has_push_back, Container, |
There was a problem hiding this comment.
This is correct and everything, but I'm not sure that you should be using <experimental> stuff, I'm not even sure which compiler(s) have it.
If you need is_detected, that's reimplementable in just a few lines of code.
For example filtered or transformed on a map or a set Pending are support for QHash and QMap.
118f4ba to
2ce69ab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For example filtered or transformed on a map or a set
Pending are support for QHash and QMap.