projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
746c29b
)
pool: add emplace() function
author
Eddie Hung
<eddie@fpgeh.com>
Wed, 22 Apr 2020 15:14:07 +0000
(08:14 -0700)
committer
Eddie Hung
<eddie@fpgeh.com>
Wed, 22 Apr 2020 15:14:07 +0000
(08:14 -0700)
kernel/hashlib.h
patch
|
blob
|
history
diff --git
a/kernel/hashlib.h
b/kernel/hashlib.h
index ad2ed60339adc25c008ac17d7037c05fe2e17c8f..ba224191c4302ee7ad67c0c0e9c85c99ce2791f0 100644
(file)
--- a/
kernel/hashlib.h
+++ b/
kernel/hashlib.h
@@
-871,6
+871,12
@@
public:
return std::pair<iterator, bool>(iterator(this, i), true);
}
+ template<typename... Args>
+ std::pair<iterator, bool> emplace(Args&&... args)
+ {
+ return insert(K(std::forward<Args>(args)...));
+ }
+
int erase(const K &key)
{
int hash = do_hash(key);