3 ms·
Well currently I only work with C not C++ anymore so my knowledge might be outdated. I thought that the rvalue reference is something new in C++11, as I read it
by tuhdo 12y ago
Well currently I only work with C not C++ anymore so my knowledge might be outdated. I thought that the rvalue reference is something new in C++11, as I read it here: http://thbecker.net/articles/rvalue_references/section_01.html http://thbecker.net/articles/rvalue_references/section_01.ht.... Your article seems to mention different thing from 2008? In the article I read, a function returns a pointer that you can assign it like this: get_pointer() = 1;
- stinos 12y agoThe design of C++11 started way before 2011, hence articles from 2008. get_pointer() = 1; assigning 1 to a pointer isn't the best idea :P so I think you mean you read int& get_reference(); get_reference() = 1; which is about lvalue references, not rvalue references, and has existed in C++ since the beginning.
- tuhdo 12y agoThanks for the explanation.