Lvalue vs Rvalue Reference Binding
Given these two overloads, which is called for each invocation?
void process(const std::string& s); // #1
void process(std::string&& s); // #2
std::string a = "hello";
process(a); // Call A
process(std::move(a)); // Call B
process("literal"); // Call C
Sign in to answer questions and track your progress
Sign In