220 34158 <CAGsORuDZ=TVXNXr5NfZv-fry_kCRkmp_0+kNy59EqoRgr_BzPg@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Zhihao Yuan <zy@miator.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Structured bindings with polymorphic lambdas
Date: Sat, 26 Aug 2017 16:07:27 -0500
Lines: 42
Approved: news@gmane.org
Message-ID: <CAGsORuDZ=TVXNXr5NfZv-fry_kCRkmp_0+kNy59EqoRgr_BzPg@mail.gmail.com>
References: <b8d14aa1-adcb-41d9-8fe8-d70805927161@isocpp.org>
 <8497b31b-7c9d-4334-ac22-0809c958cb93@isocpp.org> <15a70d94-e039-4f82-ba01-bde9d3fbacbd@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 1503781659 28463 195.159.176.226 (26 Aug 2017 21:07:39 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 26 Aug 2017 21:07:39 +0000 (UTC)
Cc: rmn100@gmail.com
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCSKRWMD4EHBBEOGQ7GQKGQEFESHC5Q@isocpp.org Sat Aug 26 23:07:34 2017
Return-path: <std-proposals+bncBCSKRWMD4EHBBEOGQ7GQKGQEFESHC5Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f199.google.com ([209.85.161.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCSKRWMD4EHBBEOGQ7GQKGQEFESHC5Q@isocpp.org>)
	id 1dliIe-0006fY-Db
	for gclcip-std-proposals@m.gmane.org; Sat, 26 Aug 2017 23:07:24 +0200
Original-Received: by mail-yw0-f199.google.com with SMTP id u6sf28583707ywu.4
        for <gclcip-std-proposals@m.gmane.org>; Sat, 26 Aug 2017 14:07:31 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1503781650; cv=pass;
        d=google.com; s=arc-20160816;
        b=MKz6nPGax9ePhdlC32Yi/f63jw9C4vbSapL6kWiIkZIqc3cepN7Lc+s+PdDcTCYkCH
         vuBsUhqu7dm+7lIp+03pDU2quPtIpvSvJ+LJ/gUMd9zlmbrBjhWqFm797hD/4E72B0R3
         xms3VyYTfTZKyrouoUfVpponWx47+rQhm+oOfJGD3Q3LPkyUdZNqPDAHBOSEM8Pvw6bg
         LKPdO37M+XZMNZrRQ+kgYqVe9gx0+65tW7tTjrt9pk3rgMMUmWPr0atIhAV0KXXH42ob
         5NXCJ0p/8+eREsfYeydxxgRGLuEdqQtNDR6vnJuU0g3erYrVszxbWlXY15TWeQOYMFL0
         ldUg==
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:cc:to:subject:message-id
         :date:from:references:in-reply-to:mime-version:sender
         :arc-authentication-results:arc-message-signature
         :arc-authentication-results;
        bh=UrGkEIfs5W8tCDYtf2xoA6ED8Ago9p3oaYHD4zQaaig=;
        b=O/Se0MFl2qYfzf6QbIMYvkKr02/BhDycr+7OxJiu8Arzn2hTusTup8S/Fbe2ZNN0Zo
         qxxAzUZOSHN0y0crYmY/SdKrrddC1u9NJL0huxui5vdXEne0CxbDuli04jVSmxuxcQoz
         zhhgcK0uBNPWVyiG3KPcha7Oj/AUCzqA7mtoYP2mVmO7ROPTy3VCqUlz8SrQx3ZiUXVh
         UYpk1aEQ9JTwsVwkevmfKx5w1iayf31st4pu/Hxr3ESiYKwi4dh1C6QraZqYz9h2NnDm
         bCQA8fbxWMhzBOMBKKwOIbVQV7ny2dsqXkZGxmbqWOKRHjtLDku7GDviN6yWZWGrvTb+
         t4Qg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@miator.net header.s=krs header.b=gOFKDZiZ;
       spf=pass (google.com: domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates 184.173.153.196 as permitted sender) smtp.mailfrom=bounce+3f9131.69110-std-proposals=isocpp.org@miator.net
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:sender:mime-version:in-reply-to:references:from
         :date:message-id:subject:to:cc: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=UrGkEIfs5W8tCDYtf2xoA6ED8Ago9p3oaYHD4zQaaig=;
        b=poJ+LFOz9Z8Y5MPBVVkx/4Re76K/3EJ+SYMX8ZwMCWsv3fnVyy6sNM71bVc9bb3cCc
         HOfm88GYaqsTLqkpJUwd4WsLfQaUhaorG2VczVVHkFsFsc/NNpwTlPFw6I4qCyqHvFTU
         hANzcy6IcljQqN/77AVaN4Q99do3mYfWXOxLU3x4idb5MAvkAuSSpegDMWU8J7fBPinF
         ZWmjv0BpWk5tVQGz1x2i0HutNqMYzuu2QRA70Qp+gQwHlHVL0WZEpyzQyV8nM43QkJ4M
         dYgEOwFWpOxtuedemC9CrTJK2SpcNk+ZXAS1TOsBi07/NyaJHm8Ili5A0bVstdmxnVII
         sm9w==
X-Gm-Message-State: AHYfb5gZ0KtOIOPt4ItYdAC0EuL3AcwrijVy+u4n1Q1Dd8PWD3n7xI7y
	4vZ2eEqLjJLcedEu
X-Received: by 10.13.228.197 with SMTP id n188mr2027640ywe.131.1503781650571;
        Sat, 26 Aug 2017 14:07:30 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.29.199 with SMTP id d190ls2983219iod.39.gmail; Sat, 26 Aug
 2017 14:07:29 -0700 (PDT)
X-Received: by 10.55.167.213 with SMTP id q204mr3619036qke.262.1503781649210;
        Sat, 26 Aug 2017 14:07:29 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1503781649; cv=none;
        d=google.com; s=arc-20160816;
        b=cq+e9ZO1VfaSVO8MbHtV229Qcj/jowm/v520wJNrY8neO71EKrYaHBmPiB38a2gYni
         1NCTKx9tNqau3lrT01BY4oOp+UrfOUQWvzNwkwIBlqEujHXbpvpkg0yXarP/NDE0nadi
         xFtxLDQpgOF8GCkQz08Mdl/K59g+1BjzlmRzXFKi5SwEHhHuIq3iHxEZT1fybxnKbR9+
         M+7lA8sDgUOEG49gT3CgFTrRI9cPzZDPE+Jrrr5kJFDxxOvzMACY06DSOW6YdqYmdUEN
         PCca3g4bJn5dAbUhgquc7VyGtNWjtYsczB7zIlo1nNT533+yHgM8KNkqj6D8KrfzH392
         KS/Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=cc:to:subject:message-id:date:from:references:in-reply-to
         :mime-version:sender:domainkey-signature:dkim-signature
         :arc-authentication-results;
        bh=vrgUfn8QqnJzf11bZrKh7InFweHJPd0J/8o676C4w5M=;
        b=fbjNAILOcjYhYYt0CWcTElJDog435BKPWDTBcpKrlmrtua/OacKnUCOkS95IrQLc/w
         I4MvzVQxxRg82epNCpPXqE/jB93hOxjcLrI7fo5BsXY/dgn2PiYXYecpJ0/0WXQMDk23
         yLpkLaJjkruFKRipNVZuhtjfb/vtdjoNjrkyDGfxy3c+ANkkfNGa4isYy38NUPRy55nL
         boemcA5r3WZ3gzpiDrkVA4bVuUL2Cjyy5c1h/ijcAA/v3TxTka3GOCMpDdk7kF5MbitQ
         xYwopWEbP1MNsV8uXqbtPDZoaAV6Lq60/eJXRr/K86FLBgKnYBR40gwDniSpVa3Uudks
         8PDg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@miator.net header.s=krs header.b=gOFKDZiZ;
       spf=pass (google.com: domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates 184.173.153.196 as permitted sender) smtp.mailfrom=bounce+3f9131.69110-std-proposals=isocpp.org@miator.net
Original-Received: from mail-s68.mailgun.info (mail-s68.mailgun.info. [184.173.153.196])
        by mx.google.com with UTF8SMTPS id 32si8773302qth.25.2017.08.26.14.07.29
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 26 Aug 2017 14:07:29 -0700 (PDT)
Received-SPF: pass (google.com: domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates 184.173.153.196 as permitted sender) client-ip=184.173.153.196;
Original-Sender: zy@miator.net
X-Mailgun-Sending-Ip: 184.173.153.196
X-Mailgun-Sid: WyI3MTBkYiIsICJzdGQtcHJvcG9zYWxzQGlzb2NwcC5vcmciLCAiNjkxMTAiXQ==
Original-Received: from mail-qk0-f169.google.com (mail-qk0-f169.google.com [209.85.220.169])
 by mxa.mailgun.org with ESMTP id 59a1e310.7fe2e8058670-smtp-out-n01;
 Sat, 26 Aug 2017 21:07:28 -0000 (UTC)
Original-Received: by mail-qk0-f169.google.com with SMTP id p67so12393936qkd.2
        for <std-proposals@isocpp.org>; Sat, 26 Aug 2017 14:07:28 -0700 (PDT)
X-Received: by 10.55.9.20 with SMTP id 20mr3340855qkj.355.1503781647839; Sat,
 26 Aug 2017 14:07:27 -0700 (PDT)
Original-Received: by 10.237.41.1 with HTTP; Sat, 26 Aug 2017 14:07:27 -0700 (PDT)
In-Reply-To: <15a70d94-e039-4f82-ba01-bde9d3fbacbd@isocpp.org>
X-Gmail-Original-Message-ID: <CAGsORuDZ=TVXNXr5NfZv-fry_kCRkmp_0+kNy59EqoRgr_BzPg@mail.gmail.com>
X-Original-Sender: zy@miator.net
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@miator.net header.s=krs header.b=gOFKDZiZ;       spf=pass
 (google.com: domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net
 designates 184.173.153.196 as permitted sender) smtp.mailfrom=bounce+3f9131.69110-std-proposals=isocpp.org@miator.net
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:34158
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/34158>

On Fri, Aug 25, 2017 at 2:19 PM, Curious <rmn100@gmail.com> wrote:
>
>> Also, now you need to explicitly specify the order in which these
>> decompositions happen. That is, if you have two structured binding
>> parameters, which one gets decomposed first? At the very least, you should
>> explicitly state that there is no order.
>
>  In my mind they should follow the same order as for a regular function,
> with the decompositions happening in the same order as constructions of the
> parameters.
>

In your latest draft, you choose to decompose inside
function body, so I have a further suggestion: entirely
split the decomposition step from the parameter
copy-init step and define the decomposition order
to be left-to-right.

  [] (auto [a, b] /* underlying object x */,
      auto [c, d] /* underlying object y */) {...}

When invoking this function, copy-init x and y in
unspecific order, then decompose x into a and b,
then decompose y into c and d.  This can further
simplify the model, because that will be no difference
from

  [] (auto x, auto y) {...}

from the caller's point of view.

-- 
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
_______________________________________________

-- 
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/CAGsORuDZ%3DTVXNXr5NfZv-fry_kCRkmp_0%2BkNy59EqoRgr_BzPg%40mail.gmail.com.

.
