BAN: Make HashMap key move constructible

This allows using non-copyable types as keys
This commit is contained in:
Bananymous 2024-11-26 00:57:11 +02:00
parent 7316eb87b8
commit 6f118c1be1
1 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,12 @@ namespace BAN
, value(forward<Args>(args)...) , value(forward<Args>(args)...)
{} {}
template<typename... Args>
Entry(Key&& key, Args&&... args) requires is_constructible_v<T, Args...>
: key(BAN::move(key))
, value(forward<Args>(args)...)
{}
Key key; Key key;
T value; T value;
}; };