mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
AK: Support setting with non copyable keys in HashMap
This commit is contained in:
parent
fdfdb5bd1c
commit
7356110033
Notes:
sideshowbarker
2024-07-17 20:31:46 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/73561100332 Pull-request: https://github.com/SerenityOS/serenity/pull/12037
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, 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, 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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue