hash_map.entry(key).or_insert(value);
The key
is moved, so I need to clone it if I'd like to use it again. If such entry already exists the clone will be immediately dropped. How can I avoid cloning in such case?
hash_map.entry(key).or_insert(value);
The key
is moved, so I need to clone it if I'd like to use it again. If such entry already exists the clone will be immediately dropped. How can I avoid cloning in such case?