Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Need confirmation about the note below in the Standard.

$
0
0

Paragraph §3.10/2 in the Standard:

Whenever a glvalue appears in a context where a prvalue is expected, the glvalue is converted to a prvalue; see 4.1, 4.2, and 4.3. [ Note: An attempt to bind an rvalue reference to an lvalue is not such a context; see 8.5.3. —end note ]

I believe the note above expresses the fact that one has to use std::move() to convert an lvalue into an rvalue reference., i.e., you can't rely on the compiler to do that automatically for you. Is that correct?



Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>