BAN: Make HashMap key move constructible
This allows using non-copyable types as keys
This commit is contained in:
parent
7316eb87b8
commit
6f118c1be1
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue