220 35154 <3545851.gG3tdlLWKt@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: std::vector must have strong move guarantees.
Date: Mon, 30 Oct 2017 12:19:48 -0700
Lines: 27
Approved: news@gmane.org
Message-ID: <3545851.gG3tdlLWKt@tjmaciei-mobl1>
References: <0f1d296f-1d9c-4a63-bde0-bb1085b56e6c@isocpp.org> <42c8d01c-afce-5013-ad2b-b873fdac11ec@gmail.com> <9044cb40-c9d7-4773-b2bd-536ed112bcbe@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1509391192 22560 195.159.176.226 (30 Oct 2017 19:19:52 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 30 Oct 2017 19:19:52 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBWHW3XHQKGQEFQIZIEI@isocpp.org Mon Oct 30 20:19:46 2017
Return-path: <std-proposals+bncBCB4TK757YBRBWHW3XHQKGQEFQIZIEI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr0-f199.google.com ([209.85.128.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRBWHW3XHQKGQEFQIZIEI@isocpp.org>)
	id 1e9Fb8-0005Kq-Gr
	for gclcip-std-proposals@m.gmane.org; Mon, 30 Oct 2017 20:19:46 +0100
Original-Received: by mail-wr0-f199.google.com with SMTP id g90sf8620468wrd.14
        for <gclcip-std-proposals@m.gmane.org>; Mon, 30 Oct 2017 12:19:54 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1509391194; cv=pass;
        d=google.com; s=arc-20160816;
        b=nSDQ8VWoV2ttUKNs8Je8EkTXFQVEQtWn3xyDEtXjPi6q+75i/UFR9HGJxkM5pqH1dZ
         b6pwolmm/dfwQKNqFfPxSDxCslVAGrocSVe39RelBrCu5Ee9zK4Hmf8UMuCkzONEOM6O
         AKv0ljWZ0BBMxaeIDT4HRxEipnqW/hR2dkN/ROTtulkk5fOIpJXeWmfCOY0tj+7tgRkS
         JuwVPIzP5FLx7JRf2skIklua53r3u/obUIpJG15wFwGSNTheDw/65cCeikQJys6qSWpd
         4/t1116SbsMdn4N7ux3Uh3cJG46WrBOvxAtrTdIbHIyTHIF9ozTQ/VZBtEvfhgD9JNeI
         PwPg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:mime-version:references
         :in-reply-to:message-id:date:subject:to:from
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=7nplAm7VEz0jVdIOZbYqNySsuWBZthYRl38FFoYIHPs=;
        b=SMKvLqJpBgct8/Xj3ippK//rLkoHVIlpwu47cvgyCKzpwjK8xO3flt5m4WAfuP5322
         bhIra9nBJdCl+C6vlEc3cv2oEyyphzSFG7BIZL9iAmAYrLNQ+3YQXaKDOEYPfx6MFZ8Z
         1rKncjT/Jr35bZlQy3N8t3WCROFuOXJxIEwjqmrMo4DS5Ktg77XXYnFxJO9h9LMpGdAt
         yZ+yxShf0alGYhHOVMBtKHxFuGehXaBWCNxrHmwHCBYh1pkGzxd15DAINN10Mt5n9DHV
         A6o+EdUlvUFdqOCeGNBacRTsh2Uw9Zqf7lkt/e+4xMZaYX35lHyPB9CMTA563r/pyyyQ
         p9Ow==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:message-id:in-reply-to:references:mime-version
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=7nplAm7VEz0jVdIOZbYqNySsuWBZthYRl38FFoYIHPs=;
        b=1B9qa5gwGrAc8EnpjspphULPCVrLVtGTpGbPSFhzJ8/9iAgl7/A0mfPsxEc5qRqYeG
         D+Q6C97SrHyNDiAgYyGjP6fbdJFJChzZ8/W+R2LERDfutNc3hcxK6P7S3ztLlje0SwPZ
         2j3ZPYixWXB2tcO8tZrhQcARBDp1GnXdfL5aBD03TxW/lqLO2EiU9HEwNc7HlzqJwuVu
         85754XcQLhFHOBwd6y/+2fEmtoCWi9hTqbDOQmELuuUFz6+i5S3ZS/xTzurW6qd2udEN
         yWWbBcb6dC4D6sqCuAG98EvYQfT+r5zhanazMXyOyzXUz2UiQK4h8nf9IPcyBKlBbdGI
         lYtQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
         :references:mime-version:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=7nplAm7VEz0jVdIOZbYqNySsuWBZthYRl38FFoYIHPs=;
        b=CCYwBo6FPK9OcKYKkzbafoX9ruIu15QzFu5q3UpWy2xm0v3oI3kP6JnSGXVraFMJmy
         wDzgXsjoXc48K7FgXLUwa2uhFXXT6+RALSh9JWRFFpQKn+U6XbYNWgpXTWVJDZtry3WT
         U9r3B4tUDgT6TvGRUFwB3fLC9SG+ub/Qa766nUoNzSZxj/lwrXb5HXaK2fTmWN/5i4qG
         riPgGkRPj0UF24BXfZEJnXQyA89xGdN/f/mYjDRgiirCrlv0s3mfT5K+t8GwFZW2npjJ
         +F36FyBlATrKKFMKWiLcBeO6MZnPf26C5QqiGLLpjruy1/7p2+DHOLOH4RoCa9KiwXqy
         RpeA==
X-Gm-Message-State: AMCzsaUnX3wpjxjun6vfZMAp4FTrqydLb+CBTotzXi558d0T4G/rE81o
	bQ9YaSr65vRTliPwrveO670dCw==
X-Google-Smtp-Source: ABhQp+RRrRBFtwoGvjgHSR/c6KjpnZqo5mLhl5U4pzrflDBvx0bqk/ZR75sC+MXpTg6nOCgm07m+rg==
X-Received: by 10.28.197.72 with SMTP id v69mr615580wmf.26.1509391193961;
        Mon, 30 Oct 2017 12:19:53 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.157.214 with SMTP id g205ls2027721wme.1.gmail; Mon, 30 Oct
 2017 12:19:52 -0700 (PDT)
X-Received: by 10.28.170.206 with SMTP id t197mr2401921wme.52.1509391192450;
        Mon, 30 Oct 2017 12:19:52 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1509391192; cv=none;
        d=google.com; s=arc-20160816;
        b=bnalCImHS54M/btsXycLiNJKyLRzNJsxA9QZU0VM37Y9HKVFKRJ1QDqgiHc6QrdsKz
         8maK3P2muWXgf3pvSFn+BEMRaaS/NoJZEMHG0cixnpeB62uUnpkvYhY2ZxsEnXgAISQb
         EsU5/N0HjPwfd5fNKlf7DQP1eeRE44qdMIU+Ll5LqGVmla/xgDVX52M2qpayAdUn6dJw
         BkBPO/dmDeRRjF3c7/2g1VeUu0RzIFVT9S1e9qS71o/4KfAiymuOefTUy9GzXlcIIzii
         FGoPAviBFCFHmA8NEi3FmcKD711U8F9a7rOiX2qraFgmshSyYqrlp3NqsQVUw1a53HRI
         yYrw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:to:from:arc-authentication-results;
        bh=JMYv6cIgEaIlDWAocNFceJfPy5sYrjUf5mnG42HNDjs=;
        b=q4Itaq/yxEo2jnpk1SrkQbRyclqazxHuwDBkNyr3/LBWvzSaq3HPU9BNbPRNohQ7iT
         rAgyH/LR7bHhK25qv4e8Kg6vIDBiY4Zrvb/GGuGjtFUBHD0T/HJoI4z7buP1UxmD3Eik
         75bXUK3yWUGpBV6dLaJS/rk2WgXv+MChPfitCsRMVxGD61FRW1I3yX2JNxR1e6nAhM+0
         PRgXSobC3GYv+W9BijKDxPyjGgZego4ThcMG8AtAVKDFprFKnpiHRHzFnku6o4o3gAYd
         uWD4CHeYH8ywcXydMwbHydxvtPfSWP2C8AaG/gzk4qGZhfu8YPKjSQbV5sHm9ixuxG+e
         fK1A==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id r20si3837223wmb.17.2017.10.30.12.19.52
        for <std-proposals@isocpp.org>;
        Mon, 30 Oct 2017 12:19:52 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) client-ip=78.47.120.188;
Original-Received: from tjmaciei-mobl1.localnet (fmdmzpr03-ext.fm.intel.com [192.55.54.38])
	by gondolin.macieira.info (Postfix) with ESMTPSA id C25AF11B610
	for <std-proposals@isocpp.org>; Mon, 30 Oct 2017 12:19:50 -0700 (PDT)
In-Reply-To: <9044cb40-c9d7-4773-b2bd-536ed112bcbe@isocpp.org>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:35154
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/35154>

On segunda-feira, 30 de outubro de 2017 12:06:56 PDT tower120@gmail.com wrote:
> So, move = faster copy ... Is this defined somewhere in standard? I thought
> about move semantic rather as Rust's move - we work with the same object,
> but now just move to another space, faster/slower is just optimization
> details.

This discussion is getting blocked by the identity of an object. If an object 
is the same object if and only if it has the same pointer address, then 
std::vector always copies when it reallocates. Whether it calls the move 
constructor or not is a detail.

If an object is the same provided it was always moved from another, then 
std::vector could still have the same original object. This is of relevance 
for objects whose copy constructor needs to allocate memory (like pimpl 
objects), in which case you can tell whether it's the same original object by 
looking at those pointers.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/3545851.gG3tdlLWKt%40tjmaciei-mobl1.

.
