pool: add emplace() function

This commit is contained in:
Eddie Hung 2020-04-22 08:14:07 -07:00
parent 746c29b171
commit a7c66fdc61
1 changed files with 6 additions and 0 deletions

View File

@ -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);