The usage of left value reference and right value reference of cantilever 11
This article mainly explains the usage of left value reference and right value reference of cantilever 11. The content of the explanation in this article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn the usage of left value reference and right value reference of cantilever 11.
The left value is a persistent object that still exists after the end of the expression, which can appear on either the left side of the equal sign or on the right side of the equal sign.
The right value is because it will be destroyed after the declaration, so it cannot be placed to the left of the equal sign.
# include using namespace std;void Print (string& s) {cout