cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
question about && in declaration
question about && in declaration
Mar 11, 2014 at 5:36pm UTC
swobph11
(2)
I sometimes found the declaration like 'int &&a', 'T &&v' in the function argument list. What's that meaning?
Mar 11, 2014 at 5:39pm UTC
Disch
(13742)
They are r-value references.
This article has a pretty good explanation:
http://www.cprogramming.com/c++11/rvalue-references-and-move-semantics-in-c++11.html
Mar 11, 2014 at 6:01pm UTC
swobph11
(2)
Thank you very much!
Apr 25, 2014 at 3:49am UTC
KyiannaJones
(20)
Here's an example of a Double Address Operator:
vector&
operator=(vector&& __x) // <-- Note double ampersands here
{
// NB: DR 675.
this->clear();
this->swap(__x);
return *this;
}
Link, for additional help:
http://stackoverflow.com/questions/4549151/c-double-address-operator
Topic archived. No new replies allowed.