220 28534 <CAFk2RUb_y9r3C99s_Sqeh7dxCkqeE-j9fCP_DbH0S7+ip_pF5g@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: A plea to reconsider adding Structured Bindings
 to language
Date: Wed, 5 Oct 2016 17:26:07 +0300
Lines: 32
Approved: news@gmane.org
Message-ID: <CAFk2RUb_y9r3C99s_Sqeh7dxCkqeE-j9fCP_DbH0S7+ip_pF5g@mail.gmail.com>
References: <201610051238.17863.marc.mutz@kdab.com> <201610051300.02280.marc.mutz@kdab.com>
 <CAKgx6B+kywTPwYVRt3P5KDQ_=xMUuHzSJv6x21L5j1ExPz6bkQ@mail.gmail.com>
 <201610051411.30312.marc.mutz@kdab.com> <073a7698-1388-4858-b6fa-b2b62a4fb6f1@isocpp.org>
 <CAFk2RUZwZLgNW6-XjHaZO+-aPa7AsA8EsHO9Vbf=x+FHe-GL-Q@mail.gmail.com> <bdc55144-9d72-4661-958c-3582a535b579@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 1475677596 22440 195.159.176.226 (5 Oct 2016 14:26:36 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 5 Oct 2016 14:26:36 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC5JHI7A7ALRBAE32S7QKGQEWJ3KJWI@isocpp.org Wed Oct 05 16:26:29 2016
Return-path: <std-proposals+bncBC5JHI7A7ALRBAE32S7QKGQEWJ3KJWI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f70.google.com ([209.85.213.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBAE32S7QKGQEWJ3KJWI@isocpp.org>)
	id 1brn95-0002YA-NC
	for gclcip-std-proposals@m.gmane.org; Wed, 05 Oct 2016 16:26:07 +0200
Original-Received: by mail-vk0-f70.google.com with SMTP id 83sf130036066vkd.3
        for <gclcip-std-proposals@m.gmane.org>; Wed, 05 Oct 2016 07:26:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :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=86NsRcswEU3NwxDsNslGzPU/9tp7SPhrt4AKt6tDBHc=;
        b=Pw1ilxf2Y5Hbq6AhdbRvHZTDryK/XdQnVF0w4wCmz5/uRE39upe2W6lWqbz9WZQFDN
         qHjaApObWEpzKAo2NpMP/Bss9rr9GUrGF8EdwdXt9CGV5qNttLtb6cQvSBH0HaNI0uUJ
         UkekGTFyK1A86aCVe+RLyjhKxfQFvT1er+0AjgQ4t+3dXGUiK9VlreW829NC2icNEwBK
         Wqi/zjE7s40hGCZ4TqEuh3dCG2fwyJxy5GCXJLNJUsXLeqODI3rD0Sy7cXKAgRLKhjKM
         4O6REJUQIuu0gyDtpSiJQMspxiiVWiaQNsaAAGi+buC8UKYNLXBLg47V8uoqHex9yGQK
         ANnw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to: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=86NsRcswEU3NwxDsNslGzPU/9tp7SPhrt4AKt6tDBHc=;
        b=Yc8Whg/6FRCPxrAEDqYTrBbNuDE05TNzQC0COOxQwCSHD1FrqU+89n0QGiMhcP6JsH
         cmbiWqdMKjGSF8pfqXL/41GeoJzUbzNXM7gv9QOpaPJzWKZWUQ7v+IqosohZ1JO4lzoE
         6OG3fFF9y84JMDuKmFf7nK+g0aHx1O2jQux7LssunxSQbX3dvLEOemySurzXlW3Z0h4L
         UZNO28ePDlwvYW//bf85ZBtbtxYQWWEJvj9xAjm6ubi/gP1N5sI52jcbD7DdjKIiaU04
         BYn3emDZD9PZ1Lsg0XqK99Dc4BjKj0GaDWLUuzMJmub1583k+8U9MM2Qj5AfLRZCjYRv
         pbsw==
X-Gm-Message-State: AA6/9Rnubqw12cd4pVnRqAMieu1mhwyYsbZOoLmRnzXOhuUESRcFzwg8uECuv9ZdrtQsGA==
X-Received: by 10.107.162.83 with SMTP id l80mr2567098ioe.29.1475677569375;
        Wed, 05 Oct 2016 07:26:09 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.7.18 with SMTP id 18ls770272ote.9.gmail; Wed, 05 Oct 2016
 07:26:08 -0700 (PDT)
X-Received: by 10.159.37.215 with SMTP id 81mr6694425uaf.134.1475677568572;
        Wed, 05 Oct 2016 07:26:08 -0700 (PDT)
Original-Received: from mail-vk0-x22c.google.com (mail-vk0-x22c.google.com. [2607:f8b0:400c:c05::22c])
        by mx.google.com with ESMTPS id e22si16542903uaa.181.2016.10.05.07.26.08
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 05 Oct 2016 07:26:08 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400c:c05::22c as permitted sender) client-ip=2607:f8b0:400c:c05::22c;
Original-Received: by mail-vk0-x22c.google.com with SMTP id z126so222883344vkd.0
        for <std-proposals@isocpp.org>; Wed, 05 Oct 2016 07:26:08 -0700 (PDT)
X-Received: by 10.31.193.20 with SMTP id r20mr6737315vkf.44.1475677568250;
 Wed, 05 Oct 2016 07:26:08 -0700 (PDT)
Original-Received: by 10.103.104.69 with HTTP; Wed, 5 Oct 2016 07:26:07 -0700 (PDT)
In-Reply-To: <bdc55144-9d72-4661-958c-3582a535b579@isocpp.org>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 ville.voutilainen@gmail.com designates 2607:f8b0:400c:c05::22c as permitted
 sender) smtp.mailfrom=ville.voutilainen@gmail.com;       dmarc=pass (p=NONE
 dis=NONE) header.from=gmail.com
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:28534
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28534>

On 5 October 2016 at 17:20, Greg Marr <gregmmarr@gmail.com> wrote:
>> > Only if you say that you want references, using "auto &" or "auto &&".
>> > If
>> > you use "auto", you just get copies.
>>
>> You get a copy of the whole struct, not copies of individual bindings.
>
>
> That's not what's described in the paper.  Has it changed since

That's what the wording of the facility does, and what the clang
implementation does.

> https://isocpp.org/files/papers/p0217r0.html ?

See http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0217r1.html


> The binding results in individual variables, and if they're copies of the
> values from the struct, there is no reason to keep the original struct
> around.

Except that yes there is, because if the fields depend on each other,
copying them individually
can break invariants.

-- 
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/CAFk2RUb_y9r3C99s_Sqeh7dxCkqeE-j9fCP_DbH0S7%2Bip_pF5g%40mail.gmail.com.

.
