220 28533 <e6745f0f-3004-4348-ad1f-e3be259cd19a@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Greg Marr <gregmmarr@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 07:23:19 -0700 (PDT)
Lines: 84
Approved: news@gmane.org
Message-ID: <e6745f0f-3004-4348-ad1f-e3be259cd19a@isocpp.org>
References: <201610051238.17863.marc.mutz@kdab.com>
 <BY2PR0301MB207067A62039FBA165EB7AEFB8C40@BY2PR0301MB2070.namprd03.prod.outlook.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_4592_2093020881.1475677399661"
X-Trace: blaine.gmane.org 1475677420 8357 195.159.176.226 (5 Oct 2016 14:23:40 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 5 Oct 2016 14:23:40 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDEZH3XFPIINRGOUX4CRUBEQ6C5PC@isocpp.org Wed Oct 05 16:23:36 2016
Return-path: <std-proposals+bncBDEZH3XFPIINRGOUX4CRUBEQ6C5PC@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f69.google.com ([209.85.213.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDEZH3XFPIINRGOUX4CRUBEQ6C5PC@isocpp.org>)
	id 1brn6R-0008SK-5P
	for gclcip-std-proposals@m.gmane.org; Wed, 05 Oct 2016 16:23:23 +0200
Original-Received: by mail-vk0-f69.google.com with SMTP id 2sf146364985vkb.2
        for <gclcip-std-proposals@m.gmane.org>; Wed, 05 Oct 2016 07:23:25 -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:in-reply-to:references: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=xFBetOnIycqknRXcyYcqjDXwZG5URBXnRW1pULCKp3w=;
        b=ouuHA99HqGgvef0NEr9LW2kwYpyhsHAJnw9TtmSQffJ7hFlPKAm/GfFFhs8Em6J0pf
         AJX4kwfQ56kAoGgbDv8XqMaTC7Rx+h6mR5CfhK0XeOCKgy0tJbndpijkqdfK3YN8cJkd
         /E7+3EBv/GTyOAu7KIc9dy6RQgwW1Iplux6LXavbl9sBGO0eXBGOd9NmnOF/5+apDseh
         7MvcAPRskFJc6V0i7/Cx7QXB0a1thhsseOvyu+xZyDkDJ25Vblx7mDKrQUW84s47ayk9
         OcYILkXYJqnc6yEjNHEBG+5s7JLuUPkkHFdXWXcPxfvUgeNTSJTWW9XwJvfxqCLoIRTq
         Dw2g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references: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=xFBetOnIycqknRXcyYcqjDXwZG5URBXnRW1pULCKp3w=;
        b=IYYXTvKVZcj8tgy7hV40+aa+9aDIZYUX/34TK6hDkcWs5uhlYkK1pm0Ip34YEUxvMO
         5S3T7wu8FZI94AqXLuiMa5oPS1FISSECVk4WtBCz3F0WucpPJisdUyKdrPFr7hcL79E9
         ReXRR70PjFY5FKHvcPqFWPtStFUU65wP1yk7jWRmENHRmDQfcVFQ6s+BICRunCr06+/L
         4XVmLATLFxkOUtlS8HGrpT+vuXf/HqDEV1DV6Tz+0HcxM4OZwOL4aS9s4kjsnGX3lQkD
         g/3uHz/0JE2CjJ4n3q0B+mk5hCT/M/LrTGmUrVIjPXOT2XvuzltGAqyoGEfm3HY4FqpN
         naJw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :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=xFBetOnIycqknRXcyYcqjDXwZG5URBXnRW1pULCKp3w=;
        b=T2ERLh9vKwq+Q0Gb58n417cYONO9saXd3gEQty2JGBpdfFVkqDhJ5Qsg6dC+qVa6a1
         N3xv5bl0scvKtSVGWc+HovrB3N4tPPtVoxDArmJZiSvHg3JelwDQpYXoSpzJLNNUyFy0
         CqN8Tn8xZiCRlXKrcaCrB/OIPfGblF2TdRCpY3JPoKTYydBm8Hy8AZi8+qZ7I+lJc22X
         13zwutLUP+xoq3hQpwcykOow55bR89L0U2Kh6UVrCEYeogUlKkKhOJV5gJa4P3fY8GDn
         IpxQupUgmxjts8vdi0o5AYePFP3bLP/Ruv2DmwGOgXyUC10Z89QcQcF+IjX2P0kB4i84
         W7Lw==
X-Gm-Message-State: AA6/9RkDMjH9zZCCDOPyVmcK0/cKmC/7Rjt4BWGYxTyviG3gdHczz34bu1xQYhxlhFiXEQ==
X-Received: by 10.157.19.117 with SMTP id q50mr2427624otq.54.1475677404929;
        Wed, 05 Oct 2016 07:23:24 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.60.196 with SMTP id m187ls383321ita.1.gmail; Wed, 05 Oct
 2016 07:23:20 -0700 (PDT)
X-Received: by 10.36.216.9 with SMTP id b9mr783895itg.1.1475677400379;
        Wed, 05 Oct 2016 07:23:20 -0700 (PDT)
In-Reply-To: <BY2PR0301MB207067A62039FBA165EB7AEFB8C40@BY2PR0301MB2070.namprd03.prod.outlook.com>
X-Original-Sender: gregmmarr@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:28533
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28533>

------=_Part_4592_2093020881.1475677399661
Content-Type: multipart/alternative; 
	boundary="----=_Part_4593_1195114652.1475677399661"

------=_Part_4593_1195114652.1475677399661
Content-Type: text/plain; charset=UTF-8

On Wednesday, October 5, 2016 at 10:14:05 AM UTC-4, Herb Sutter wrote:
>
> But SB works fine with this, because it allows the caller to write both 
> this: 
>
>         auto info = page.contains_info(ptr); 
>         if (info.found == /*...*/) { 
>                 use(info.location, info.start_location); 
>         } 
>
> and this: 
>
>         auto [found, offset, start] info = page.contains_info(ptr); 
>         if (found == /*...*/) { 
>                 use(offset, start); 
>         } 
>

Is the "info" in the first line of the second example a typo?  It doesn't 
seem like it belongs there.

-- 
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/e6745f0f-3004-4348-ad1f-e3be259cd19a%40isocpp.org.

------=_Part_4593_1195114652.1475677399661
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, October 5, 2016 at 10:14:05 AM UTC-4, Herb S=
utter wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">But SB works fine =
with this, because it allows the caller to write both this:
<br>
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0auto info =3D page.cont=
ains_info(ptr);
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (info.found =3D=3D /=
*...*/) {
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0use(info.<wbr>location, info.start_location);
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}
<br>
<br>and this:
<br>
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0auto [found, offset, st=
art] info =3D page.contains_info(ptr);
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (found =3D=3D /*...*=
/) {
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0use(offset, start);
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}
<br></blockquote><div><br></div><div>Is the &quot;info&quot; in the first l=
ine of the second example a typo? =C2=A0It doesn&#39;t seem like it belongs=
 there.</div><div><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/e6745f0f-3004-4348-ad1f-e3be259cd19a%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/e6745f0f-3004-4348-ad1f-e3be259cd19a=
%40isocpp.org</a>.<br />

------=_Part_4593_1195114652.1475677399661--

------=_Part_4592_2093020881.1475677399661--

.
