What I'm thinking of something like X&& x = static_cast<X&&>(obj_x);is that, despite the appearance, xends up being a normal reference to lvalue. I recently met this article where Scott Meyers insists that there xwill be lvalue links like rvalue. Is it really significant, or is this difference without a difference? In particular, given either
X&& x = static_cast<X&&>(obj_x);
x
X&& x = static_cast<X&&>(obj_x)
or
X& x = obj_x;
Is there any subsequent code that will behave differently for these two definitions x?
, R- ( ).
, , no, no x - (, cpplearner, decltype()). x , ( , -).
decltype()
, , , l- . ? r- - -. , , . , , . , , , . std:: move (mything), mything [ ].
, , , , . , . .
Source: https://habr.com/ru/post/1648076/More articles:Continuous Goal in Malmo - c #Checking image sizes using jQuery plugin - javascriptValidating jQuery image for dynamically cloned form - javascriptWheel Picker does not work inside scroll - androidGetting started with an Android application is very slow, and systrace shows 30 seconds. BindApplication - performancegit commit does not open editor - gitспособ конвертировать изображение прямо из url в base64 без сохранения в виде файла python - pythonПосле изменения parentNode.innerHTML не удается получить доступ к parentNode - javascriptfailed to create application, invalid file type in Phonegap assembly - cordovaRuby - reading each line in a file for an object and adding the object to an array - ruby | fooobar.comAll Articles