220 32506 <CAGsORuCq3+KhQjp7ARb8fvjaROAEEFP45geKENkPg3C_trmT=g@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: Allow Structured Binding Outside of Variable Declaration
Date: Tue, 16 May 2017 17:56:26 -0500
Lines: 98
Approved: news@gmane.org
Message-ID: <CAGsORuCq3+KhQjp7ARb8fvjaROAEEFP45geKENkPg3C_trmT=g@mail.gmail.com>
References: <e02d79e8-7d80-4614-bd25-e73fb43dad9d@isocpp.org>
 <10b21241-b683-44d5-82ce-90681b2643a4@isocpp.org> <CAFk2RUbf5skMEcsLd_hUiZrib2bGCvyrJbgsx9LV-rXaj=fBZw@mail.gmail.com>
 <CAFk2RUbgg7UMc_mFGKQZF7-PVVbEDsdoZoXL46oyxr+PLRTfvw@mail.gmail.com>
 <08ff73f1-6989-393e-ee4e-8158af2e7bed@honermann.net> <CAFk2RUaBhq7KVukgRMvqBMuBiBwZmCf+xZpD9jRtBberFoU2Rg@mail.gmail.com>
 <c70b0cd6-fa3e-d215-3fef-06eb231ed3cd@honermann.net> <CAFk2RUbiUZ4n_mXdBUTGEZSsh5C=Mf0hKbKu76PKzCCWnZfrgA@mail.gmail.com>
 <d184a83a-4f99-a8d2-6bba-1b8aeedd797c@honermann.net> <20170516164245.GA16348@fukushima.lysator.liu.se>
 <ffcb4ca3-5fb8-41b4-8b38-cfd287148cd5@honermann.net> <CAFk2RUY1AYOen-Rb8n6yzc1jsOiydbUCUDqLdKMPyiyiHnnO4w@mail.gmail.com>
 <c0bf3a06-53e5-3411-0967-b167da5d0dcd@honermann.net> <CAFk2RUYaNuKM=xhLTP_ZE97KvRUAJybUhaoFAmT+V_-7P3t1Mg@mail.gmail.com>
 <CAGsORuBgzhCGGPYAWjSDg40xhGnV_ghcVTAvn3xaBFz52vs7xw@mail.gmail.com>
 <CAFk2RUahRzietkqHtmPrRNSmEorfKF8TfiHGNAB_JDMhC4PU+g@mail.gmail.com>
 <CAGsORuDWRidpKi6nj5Bm8m+hHTy7PVKzzZFq_=vaA7XMdb3odw@mail.gmail.com> <CAFk2RUYeKYjhmX9fVwDaV7zJRLxAmJx=hSsgPWLMFJD+wTW3MQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="94eb2c14f94cdceb57054fac144d"
X-Trace: blaine.gmane.org 1494975389 25647 195.159.176.226 (16 May 2017 22:56:29 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 16 May 2017 22:56:29 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCSKRWMD4EHBBHEH53EAKGQEADQQHZA@isocpp.org Wed May 17 00:56:24 2017
Return-path: <std-proposals+bncBCSKRWMD4EHBBHEH53EAKGQEADQQHZA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f198.google.com ([209.85.217.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCSKRWMD4EHBBHEH53EAKGQEADQQHZA@isocpp.org>)
	id 1dAlOB-0006Vg-Hz
	for gclcip-std-proposals@m.gmane.org; Wed, 17 May 2017 00:56:23 +0200
Original-Received: by mail-ua0-f198.google.com with SMTP id 39sf56353265uag.8
        for <gclcip-std-proposals@m.gmane.org>; Tue, 16 May 2017 15:56:29 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1494975389; cv=pass;
        d=google.com; s=arc-20160816;
        b=Sy8DGgscL4g+cAoNrl2GK63w+vVJrl4NzuCqzi2RcKBTGminqT8pfL9GRAyPGQGqeK
         kd8Kx3+03G9FHQuSwSQW7VZYNXz9vkLSOpsRpZYJjerlJvRDSzgGc/8nIv7C1ZpEbKr0
         g3iI4wrnqymUtRiiFtud8I/l6vkpGfPqGSAAZWTlrusRUm9fncCcC63F/QwgHdQeYEUo
         Mgj0ewY5nocH0mjK9smkjXH1AyrMpPEI/il2VT9cJakNrljkX972mH6KDP0e4jOJPd2j
         NjQ0JJF6vQGbYYaAgvD95j3VpIDq9wsWOPtO3C48xRAC1EW86uvMXS7PyBO3NYMVA38t
         f7+Q==
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:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:sender
         :arc-authentication-results:arc-message-signature
         :arc-authentication-results;
        bh=rtW6N+LV4X0Z8rptfVe8dI2WZMyNObsfbzgEG6HhhxE=;
        b=pP9IzHkIBuTfLPRtukzyG4UOo/KW3u/wXCVcxx2ecP8yVC5GEDdNX318RSPANfuCdk
         xp/xSjzAmUU2fJCs+uQnKeDX71iJm14eZamtxYgLqd00qP6tz/7VBQvCBto7CTrZmYVL
         7tCJ+BznlubG+fzAHdn8EqdBHYRx0yj9WzvqYYSGlvuvWeDdbrNTsUln34Lo7q5vgiaX
         1UmNP0vRhk0ZcH8miNYa8DjwDJ5rW9PqhWnbUSL0b4YTkgOy3unYqSckOm8dzcxApY6C
         uWodm8GH9hL166LWqibNgCqS9pWCQ7xRnYXy7VCvEckmvFmlFQtwsybBfNQQOC97VRe6
         hvAA==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@miator.net;
       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: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=rtW6N+LV4X0Z8rptfVe8dI2WZMyNObsfbzgEG6HhhxE=;
        b=pEOILQF82z1jkry/pySZVOlXe0NRd3fQGrYJmaHiFbvU/irkEl4fAzgEWNvR3zK/jt
         RZHlOQW25qlr8S8y/tDU2EKXteH/WTX3X9eyq8fUEY9ZNA036k3cCo3EboEd0mDmo+53
         GzS6UtxKjrDC+S27pmLBsnWA9QFDC2DPFRcFpTzBUQbJFQQbYl+2Bwi0WbXptXJ88cO/
         UVryuVyq3Qz5AbkNP/uQUlIsv7CbJQgN5rPo7J/WQkGzdVPZInUsvCjL/SuVxvapsUwg
         IQ06ULChH5hF1lcCIl51YegXDjOUrWsv8KPVrqEe5ErH0OTdEPOXnpazPpEui3/lPWKv
         xtGw==
X-Gm-Message-State: AODbwcA9q2MhDk9CQkAMA+gRktsuW5iHIEs+5C+kLZ9Ce/65mk2vFypi
	o1AQADZXchwxMq17
X-Received: by 10.176.24.77 with SMTP id j13mr147941uag.9.1494975389039;
        Tue, 16 May 2017 15:56:29 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.37.235 with SMTP id q98ls2544031ota.49.gmail; Tue, 16 May
 2017 15:56:28 -0700 (PDT)
X-Received: by 10.55.221.70 with SMTP id n67mr383871qki.234.1494975388148;
        Tue, 16 May 2017 15:56:28 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1494975388; cv=none;
        d=google.com; s=arc-20160816;
        b=ohmcJ1wI4iysHsD5XTAMQY0IVSJTd0MbU9b1vbY7AHcuPN5J9vtFbRNXVYIoAqM9bv
         yy07G+E58vXh7sizm48cxNVfWY0bSEsrj8V0tT09Zmt/Bi1cN+TYeHgjsllOMeOVTOW2
         LneKGjN9aaCH4iPsKI4DAWdXzsMoCCsgFMTqUtozgr52vvlTsnw5AZ9Is/UxML7C2vtx
         afv55uonZ693taWRHKuQWDGGKv9UBpivukU8ynVfhHTt0i6u2NHLk6N44zvQvkTQe3NQ
         iR68uYMc3ExGAuCeJ7jodW5hv5zbcMysi+Av4VpnJ5Tw8c8vAaMUGUwE6wueKNR6I2ro
         Xr7g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :sender:domainkey-signature:dkim-signature
         :arc-authentication-results;
        bh=m5uuJRQgEJGMqAmY6H8LPcmv25ZkTfqFE5y+cik3XLE=;
        b=wS7iI1xzqJwL4FBVU9p3YgwBFoZ2R/4lhxd9B4Rb37yQW4X0iWi/kLN1iVJpI3316o
         J4U2Es2dfjRcXqPQt+fT7QpHBRB2Ml7+bgXW8W2pnBN+mbLOqd8fj8x1n1FZa/cMuz8X
         32hib7Qy8+pTycNLj/2PBF3q/fYqZuvlo+1iT3GydVeaRV7yV5F53sDdjt5e4a6LnqGP
         QCKVnHTF80lDjeDlYYxI+V7ccZW+AFaqg4KdjSz+njoDLXXlZrBhhxhvi5h0QYahcO3v
         5BlWFFCRQ/Ee8Gm+pqJjuPlPvj4dYlPb6FzXaGIF6EU0N/wMRPP0DUrf3v9Lpv944blx
         SdJA==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@miator.net;
       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 m41si210416qtc.237.2017.05.16.15.56.28
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 16 May 2017 15:56:28 -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-pf0-f176.google.com (mail-pf0-f176.google.com [209.85.192.176])
 by mxa.mailgun.org with ESMTP id 591b839b.7fda240d1130-smtp-out-n02;
 Tue, 16 May 2017 22:56:27 -0000 (UTC)
Original-Received: by mail-pf0-f176.google.com with SMTP id n23so82432799pfb.2
        for <std-proposals@isocpp.org>; Tue, 16 May 2017 15:56:27 -0700 (PDT)
X-Received: by 10.99.109.73 with SMTP id i70mr426594pgc.62.1494975386543; Tue,
 16 May 2017 15:56:26 -0700 (PDT)
Original-Received: by 10.100.151.71 with HTTP; Tue, 16 May 2017 15:56:26 -0700 (PDT)
In-Reply-To: <CAFk2RUYeKYjhmX9fVwDaV7zJRLxAmJx=hSsgPWLMFJD+wTW3MQ@mail.gmail.com>
X-Gmail-Original-Message-ID: <CAGsORuCq3+KhQjp7ARb8fvjaROAEEFP45geKENkPg3C_trmT=g@mail.gmail.com>
X-Original-Sender: zy@miator.net
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@miator.net;       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:32506
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/32506>

--94eb2c14f94cdceb57054fac144d
Content-Type: text/plain; charset="UTF-8"

On Tue, May 16, 2017 at 5:49 PM, Ville Voutilainen <
ville.voutilainen@gmail.com> wrote:

> >> >   for (TupleLike<A, B> [x, y] : something) { ... }
> >> >
> >> > Where TupleLike is a concept.
> >>
> >> How does that help me specify the concrete types of the bindings?
> >
> >
> > It does type-check, as same as you putting
> >
> >   static_assert(is_same_v<decltype(x), A>);
> >
> > in the loop.
> >
> > But it doesn't change the type object of the
> > underlying object, or the type of the bindings.
>
> I need to use some weird concept to check that the type of x is A?


If constrained-type-specifier is accepted as-is, I bet
people will have more creative ways to overuse it.
However, if that can restore our energy spent on
inventing new syntax, maybe I can give a "meh"...

-- 
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/CAGsORuCq3%2BKhQjp7ARb8fvjaROAEEFP45geKENkPg3C_trmT%3Dg%40mail.gmail.com.

--94eb2c14f94cdceb57054fac144d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div class=3D"gmail_extra"><br><div class=
=3D"gmail_quote">On Tue, May 16, 2017 at 5:49 PM, Ville Voutilainen <span d=
ir=3D"ltr">&lt;<a href=3D"mailto:ville.voutilainen@gmail.com" target=3D"_bl=
ank">ville.voutilainen@gmail.com</a>&gt;</span> wrote:<br><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex"><span>&gt;&gt; &gt;=C2=A0 =C2=A0for (TupleLike&lt;A, B&gt; [x=
, y] : something) { ... }<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Where TupleLike is a concept.<br>
&gt;&gt;<br>
&gt;&gt; How does that help me specify the concrete types of the bindings?<=
br>
&gt;<br>
&gt;<br>
&gt; It does type-check, as same as you putting<br>
&gt;<br>
&gt;=C2=A0 =C2=A0static_assert(is_same_v&lt;declt<wbr>ype(x), A&gt;);<br>
&gt;<br>
&gt; in the loop.<br>
&gt;<br>
&gt; But it doesn&#39;t change the type object of the<br>
&gt; underlying object, or the type of the bindings.<br>
<br>
</span>I need to use some weird concept to check that the type of x is A?</=
blockquote></div><br></div>If constrained-type-specifier is accepted as-is,=
 I bet<br></div>people will have more creative ways to overuse it.<br></div=
>However, if that can restore our energy spent on<br></div>inventing new sy=
ntax, maybe I can give a &quot;meh&quot;...<br><div><div><div><div><div cla=
ss=3D"gmail_extra"><br>-- <br><div class=3D"m_7659099891622532818gmail_sign=
ature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D=
"ltr"><div><div dir=3D"ltr"><div>Zhihao Yuan, ID lichray<br>The best way to=
 predict the future is to invent it.<br>______________________________<wbr>=
_________________<br></div></div></div></div></div></div></div>
</div></div></div></div></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAGsORuCq3%2BKhQjp7ARb8fvjaROAEEFP45g=
eKENkPg3C_trmT%3Dg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAGsORuCq3%2B=
KhQjp7ARb8fvjaROAEEFP45geKENkPg3C_trmT%3Dg%40mail.gmail.com</a>.<br />

--94eb2c14f94cdceb57054fac144d--

.
