Intermediate
C++
Q46 / 100
What is std::move?
Correct! Well done.
Incorrect.
The correct answer is B) Casts an lvalue to an rvalue reference, enabling move semantics
B
Correct Answer
Casts an lvalue to an rvalue reference, enabling move semantics
Explanation
std::move(x) is a cast to rvalue reference. It signals "I no longer need x," allowing move constructors/assignment to transfer resources efficiently.
Progress
46/100