1
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?

Andriy Tylychko
  • 15,967
  • 6
  • 64
  • 112

0 Answers0