220 32451 <e02d79e8-7d80-4614-bd25-e73fb43dad9d@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Antonio Perez <antonio@perezexcelsior.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Allow Structured Binding Outside of Variable Declaration
Date: Mon, 15 May 2017 03:00:06 -0700 (PDT)
Lines: 88
Approved: news@gmane.org
Message-ID: <e02d79e8-7d80-4614-bd25-e73fb43dad9d@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1372_915436459.1494842406123"
X-Trace: blaine.gmane.org 1494842419 12176 195.159.176.226 (15 May 2017 10:00:19 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 15 May 2017 10:00:19 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC62NS5R4EIRBJXY4XEAKGQEL3FEDUI@isocpp.org Mon May 15 12:00:06 2017
Return-path: <std-proposals+bncBC62NS5R4EIRBJXY4XEAKGQEL3FEDUI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f198.google.com ([209.85.161.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC62NS5R4EIRBJXY4XEAKGQEL3FEDUI@isocpp.org>)
	id 1dACnO-0002kK-2L
	for gclcip-std-proposals@m.gmane.org; Mon, 15 May 2017 12:00:06 +0200
Original-Received: by mail-yw0-f198.google.com with SMTP id t133sf51053788ywf.6
        for <gclcip-std-proposals@m.gmane.org>; Mon, 15 May 2017 03:00:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=xcbB8AujAv3j4qkKeIztfPa1NXm8WGw2Hsilk4hJBkw=;
        b=bZiGfOOyaPWl70Ek3f/WUdqtbo5tOcFbCsB9y48xsLyvbS5X7FX1yHqguCLmNQUhs3
         /F+b6kQkOBoItk65aezNwCON19XIPkTRFyeLpXhxJ9gsIN/CiN8SxZcD2+YbE1YbvPSj
         73KK5m345KH8MbkUs8/Akc46n7ddCxqqy4fLwsJfm062HojLN9AnTs2ICYZxVU9ObM6s
         REy4stLNgKbRydWWY52rH4+K4hKIO0EyOdzO17nVDFQSB/MGzHnam5G92kncZ106xZvs
         4SQ7GeuUGsyuM8IVuxojSE9/f0xgbF8gxDoZJ68HPlOxWROOgeuvQLa3MTRvt9IxdBao
         NoQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=xcbB8AujAv3j4qkKeIztfPa1NXm8WGw2Hsilk4hJBkw=;
        b=I6UkMuDDxcfOn3ihasdkaGDbPAYhk4N7VDx62qPDMcSCBGHikOvgie+nW/phiQ7CAg
         xDofC3idhp22FAsNZIEm1I/dntwFJ/NJVP0mLMMoKaG3rI9FUqEZV6YMM/Y57/b8Norl
         BcBdiFzLPRkYL2wuvHqT4aEnqQ+zhluSl6YGC2ijIortGtfgYCtthRPk+FjtBOM8Id8C
         jAnF+88sMerbS4pGTY5iM/26acI4ShhejxvGz3gCxL/wlk6Hh2RnE/HRAx44sMqUJGzF
         JJayynAs4NhmoNf1aBczOApN1N9cjzK1rZ3xBw8DoCenaNOHCjTvHbSgE+b7w/vsvHv5
         E63A==
X-Gm-Message-State: AODbwcB4O6j4QisGTn7O4lbaUI7L2bzhKFAU472t35VfJia9ULTD7X8t
	nY7XBwVLEcVc+Q==
X-Received: by 10.129.99.198 with SMTP id x189mr2510824ywb.27.1494842407528;
        Mon, 15 May 2017 03:00:07 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.56.90 with SMTP id r26ls12671714otd.0.gmail; Mon, 15 May
 2017 03:00:06 -0700 (PDT)
X-Received: by 10.157.13.170 with SMTP id 39mr101896ots.18.1494842406662;
        Mon, 15 May 2017 03:00:06 -0700 (PDT)
X-Original-Sender: antonio@perezexcelsior.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:32451
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/32451>

------=_Part_1372_915436459.1494842406123
Content-Type: multipart/alternative; 
	boundary="----=_Part_1373_1955337215.1494842406123"

------=_Part_1373_1955337215.1494842406123
Content-Type: text/plain; charset="UTF-8"

Structured Binding is a language feature that has a lot of potential, 
although as of C++17 it's a pretty limited feature. (This is part of a 
series of proposals generalizing structured binding). I propose allowing 
structured binding outside of variable declaration:

int a = 0;
//Random code
std::string text ="";
//More code
[a,text] = tuple(3, "Hello, world");


-- 
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/e02d79e8-7d80-4614-bd25-e73fb43dad9d%40isocpp.org.

------=_Part_1373_1955337215.1494842406123
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Structured Binding is a language feature that has a lot of=
 potential, although as of C++17 it&#39;s a pretty limited feature. (This i=
s part of a series of proposals generalizing structured binding). I propose=
 allowing structured binding outside of variable declaration:<div><br></div=
><div><div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 2=
50); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1=
px; word-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subpr=
ettyprint"><font color=3D"#660066"><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">int</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> a </span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #066;" class=3D"styled-by-prettify">0</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"co=
lor: #800;" class=3D"styled-by-prettify">//Random code</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"><br>std</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">::</span><span style=3D"color: #00=
8;" class=3D"styled-by-prettify">string</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> text </span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">=3D</span><span style=3D"color: #080;" class=3D"st=
yled-by-prettify">&quot;&quot;</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"><br></span><span style=3D"color: #800;" class=3D"styled-by-prett=
ify">//More code</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"><br></span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
[</span><span style=3D"color: #000;" class=3D"styled-by-prettify">a</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify">text</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">]</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> tuple</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">(</span><span style=3D"color: #066;" class=3D"styled-by-pretti=
fy">3</span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #080;" class=3D"styled-by-prettify">&quot;Hello, world&quot=
;</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</span>=
</font></div></code></div><br><br></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/e02d79e8-7d80-4614-bd25-e73fb43dad9d%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/e02d79e8-7d80-4614-bd25-e73fb43dad9d=
%40isocpp.org</a>.<br />

------=_Part_1373_1955337215.1494842406123--

------=_Part_1372_915436459.1494842406123--

.
