mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
AK: Support setting with non copyable keys in HashMap
This commit is contained in:
parent
fdfdb5bd1c
commit
7356110033
1 changed files with 2 additions and 0 deletions
|
@ -50,8 +50,10 @@ public:
|
||||||
|
|
||||||
HashSetResult set(const K& key, const V& value) { return m_table.set({ key, value }); }
|
HashSetResult set(const K& key, const V& value) { return m_table.set({ key, value }); }
|
||||||
HashSetResult set(const K& key, V&& value) { return m_table.set({ key, move(value) }); }
|
HashSetResult set(const K& key, V&& value) { return m_table.set({ key, move(value) }); }
|
||||||
|
HashSetResult set(K&& key, V&& value) { return m_table.set({ move(key), move(value) }); }
|
||||||
ErrorOr<HashSetResult> try_set(const K& key, const V& value) { return m_table.try_set({ key, value }); }
|
ErrorOr<HashSetResult> try_set(const K& key, const V& value) { return m_table.try_set({ key, value }); }
|
||||||
ErrorOr<HashSetResult> try_set(const K& key, V&& value) { return m_table.try_set({ key, move(value) }); }
|
ErrorOr<HashSetResult> try_set(const K& key, V&& value) { return m_table.try_set({ key, move(value) }); }
|
||||||
|
ErrorOr<HashSetResult> try_set(K&& key, V&& value) { return m_table.try_set({ move(key), move(value) }); }
|
||||||
|
|
||||||
bool remove(const K& key)
|
bool remove(const K& key)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue