Commit 9aeefaf7 authored by Dominik Charousset's avatar Dominik Charousset

Use perfect forwarding for put parameter

parent 9072e2a1
......@@ -370,9 +370,9 @@ bool operator>=(const dictionary<T>& xs, const dictionary<T>& ys) {
/// Convenience function for calling `dict.insert_or_assign(key, value)`.
// @relates dictionary
template <class T>
void put(dictionary<T>& dict, string_view key, T value) {
dict.insert_or_assign(key, std::move(value));
template <class T, class V>
void put(dictionary<T>& dict, string_view key, V&& value) {
dict.insert_or_assign(key, std::forward<V>(value));
}
} // namespace caf
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment