MESSAGE
DATE | 2017-05-07 |
FROM | ruben safir
|
SUBJECT | Subject: [Hangout of NYLXS] Fwd: &&
|
What is the purpose of the double ampersand in this use of auto
http://en.cppreference.com/w/cpp/container/vector/push_back
#include #include #include int main() { std::vector numbers; numbers.push_back("abc"); std::string s = "def"; numbers.push_back(std::move(s)); std::cout << "vector holds: "; for (auto &&i : numbers) std::cout << std::quoted(i) << ' '; std::cout << "\nMoved-from string holds " << std::quoted(s) << '\n'; } _______________________________________________ Hangout mailing list Hangout-at-nylxs.com http://www.nylxs.com/mailman/listinfo/hangout
|
|