MESSAGE
DATE | 2017-05-07 |
FROM | ruben safir
|
SUBJECT | Subject: [Learn] Fwd: &&
|
From learn-bounces-at-nylxs.com Sun May 7 01:32:30 2017 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: from www.mrbrklyn.com (www.mrbrklyn.com [96.57.23.82]) by mrbrklyn.com (Postfix) with ESMTP id 514FA160E77; Sun, 7 May 2017 01:32:30 -0400 (EDT) X-Original-To: learn-at-nylxs.com Delivered-To: learn-at-nylxs.com Received: from [10.0.0.62] (flatbush.mrbrklyn.com [10.0.0.62]) by mrbrklyn.com (Postfix) with ESMTP id 62CD2160E77; Sun, 7 May 2017 01:32:25 -0400 (EDT) References: To: "learn-at-nylxs.com" , Hangout From: ruben safir X-Forwarded-Message-Id: Message-ID: <53b2a4ef-364b-0561-239d-e319b6308ded-at-mrbrklyn.com> Date: Sun, 7 May 2017 01:32:25 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Subject: [Learn] Fwd: && X-BeenThere: learn-at-nylxs.com X-Mailman-Version: 2.1.17 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: learn-bounces-at-nylxs.com Sender: "Learn"
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'; } _______________________________________________ Learn mailing list Learn-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/learn
|
|