Lvalue to rvalue reference binding
Insert(key, Value()); // Compiler error here key here is Key&& key – this is an lvalue! It has a name, and you can take its address. It’s just that type of that lvalue is “rvalue reference to Key“. You need to pass in an rvalue, and for that you need to use std::move: Insert(std::move(key), Value()); … Read more