Revert "utility: Use insert_or_assign in concurrent unordered map"#388
Merged
Conversation
This reverts commit 53f287e.
| void insert_or_assign(const Key &key, Args &&...args) { | ||
| uint32_t h = ConcurrentMapHashObject(key); | ||
| WriteLockGuard lock(locks[h].lock); | ||
| maps[h].insert_or_assign(key, {std::forward<Args>(args)...}); |
There was a problem hiding this comment.
I think this failed because {std::forward(args)...} does not define a type, so adding T before probably (with enough luck) will help. And version with [] - it returns reference to existing/newly inserted element, so the type is known. Btw, original version from Gemini had T (that Spencer provied in internal chat)
artem-lunarg
approved these changes
Jun 11, 2026
artem-lunarg
left a comment
There was a problem hiding this comment.
Spencer is AFI. I can approve in case he is not back soon. Then we can decide if we want to fix this.
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.
Reverts #387
Was found to cause build errors in chrome.