220 31466 <8a0cf5fb-7a49-4cb0-95ba-c90583548303@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: std::visit for std::tuple
Date: Mon, 6 Mar 2017 12:54:26 -0800 (PST)
Lines: 80
Approved: news@gmane.org
Message-ID: <8a0cf5fb-7a49-4cb0-95ba-c90583548303@isocpp.org>
References: <f58de27d-28d8-4424-b9f0-1d9e9c9555cd@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1681_2116514708.1488833666583"
X-Trace: blaine.gmane.org 1488833670 17152 195.159.176.226 (6 Mar 2017 20:54:30 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 6 Mar 2017 20:54:30 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBA4Z67CQKGQEFY4WVTI@isocpp.org Mon Mar 06 21:54:25 2017
Return-path: <std-proposals+bncBCEKFTV6ZUMBBA4Z67CQKGQEFY4WVTI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f200.google.com ([209.85.161.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBA4Z67CQKGQEFY4WVTI@isocpp.org>)
	id 1ckzeA-0003Y2-6k
	for gclcip-std-proposals@m.gmane.org; Mon, 06 Mar 2017 21:54:22 +0100
Original-Received: by mail-yw0-f200.google.com with SMTP id 204sf325945822ywo.6
        for <gclcip-std-proposals@m.gmane.org>; Mon, 06 Mar 2017 12:54:28 -0800 (PST)
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=Q1NZ5K2YsBYxN+9n4wXikscMseByXOikco9969Nond8=;
        b=WHzCz8tc6Ba5oeKDDq8bl41scicvK9BK6Vdan8ewr7FN+66HOsoCCLDI01Rzg+TwPv
         phh6Tk3liEsENmnogjTwnriVhKvtzjWtknv1lAQnKxYXVtL46GvpQ+/WU0e/d0Egc9Va
         +v5w/67YxvbKKene7MSsRCgTtrYzht1cZVjsyG3uJdO7Ep+F1c9mWwLIlMmNSefdytV+
         SoIMAsDdknLduA07NfRc2OqBW+csIj/tP7P3hJ61UngldlK0mnrJDPE27ZgOC674Wh0E
         pSe4MRQooGOve4hKYx1JAIgpGlltIYe9OCWBHudX+CFop02zBaYTQbA6qKoEsVRxAtzK
         U8Tw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        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=Q1NZ5K2YsBYxN+9n4wXikscMseByXOikco9969Nond8=;
        b=SzAEJQBBBVzHxALJpt9/ML52JZnfRD4sF5NGwRYk+ejfzk/v0FIcKrwOZ2LWqh+9F6
         nSf8icqELg+XL2jTVy4dEcrIHkSLMbALqrkhn+Tx3Mf44cuyi9ishD1+bSU5mBha9UN9
         Q/nKkT6lKqXqu4HRG4j3o2Ya/3YkYf4LxH8vvN29hgV27S6iQWlvbKiFH45MPwCACzlZ
         YgbffhjD2eIEXxtFjRJArr1d5eYWA138aMyVdogRMD7y5sVhXr2od6BGtsYLeNDBx6Ps
         eCVyNMmS8Bd3kAjEW/mw5CakLj5g3Q6q15ATVyBML+aZC6xDXPBP/m1SA8PdX2LbSqCt
         dieQ==
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: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=Q1NZ5K2YsBYxN+9n4wXikscMseByXOikco9969Nond8=;
        b=SOAjngmFLQquceuVXMaKAsW9Zfp2NSfJIVkLu5iQtEsnRig3Blbs4IpKj1Ql91IVAz
         Nx7tDVElOJKT1+Ktbp/+hHdrZhy2LcXBwI41u5+D6TTEyj5gi9HAS8cDWOvK78qmwKT/
         Ysc201OFlc09x+I7ceWhRH27IgEpE1vm4XKEw4L2sdNECi0grLvUDa+FYwyN1giZOJLe
         onHlcHQ6/AsjlqalUjFTIR6uTR0cppC3ChP+GSyQtxtPnkatzFAEH6Db9Aa0lnPu2NT/
         z7LfchxD5n1jQQLtG0KMrjve5fU7VoFebHEDC+7eBGZE2d8xfaFpDSBPSlAZomv2zUPR
         P1uw==
X-Gm-Message-State: AMke39mHZYj3X+mzHQr7MFgqzC+LQHqanCwMenb8jTVhbUQUyRuexbwG3enABT6tUsNGDA==
X-Received: by 10.13.249.2 with SMTP id j2mr6623405ywf.86.1488833668006;
        Mon, 06 Mar 2017 12:54:28 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.7.195 with SMTP id 61ls16577779oto.31.gmail; Mon, 06 Mar
 2017 12:54:27 -0800 (PST)
X-Received: by 10.157.16.48 with SMTP id h45mr1314427ote.10.1488833667167;
        Mon, 06 Mar 2017 12:54:27 -0800 (PST)
In-Reply-To: <f58de27d-28d8-4424-b9f0-1d9e9c9555cd@isocpp.org>
X-Original-Sender: jmckesson@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:31466
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31466>

------=_Part_1681_2116514708.1488833666583
Content-Type: multipart/alternative; 
	boundary="----=_Part_1682_332301284.1488833666583"

------=_Part_1682_332301284.1488833666583
Content-Type: text/plain; charset=UTF-8

It seems to me that the generalized tuple unpacking proposal 
<http://wg21.link/P0535> makes this all obsolete:

auto t = std::make_tuple(100, "500", '!');
[](auto& x) { std::cout << x; }([:]t)...;

-- 
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/8a0cf5fb-7a49-4cb0-95ba-c90583548303%40isocpp.org.

------=_Part_1682_332301284.1488833666583
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">It seems to me that the <a href=3D"http://wg21.link/P0535"=
>generalized tuple unpacking proposal</a> makes this all obsolete:<br><br><=
div style=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 1=
87, 187); border-style: solid; border-width: 1px; overflow-wrap: break-word=
;" class=3D"prettyprint"><code class=3D"prettyprint"><div class=3D"subprett=
yprint"><span style=3D"color: #008;" class=3D"styled-by-prettify">auto</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> t </span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> std</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">::</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify">make_tuple</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">(</span><span style=3D"color: #066;" class=
=3D"styled-by-prettify">100</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #080;" class=3D"styled-by-prettify">&=
quot;500&quot;</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an><span style=3D"color: #080;" class=3D"styled-by-prettify">&#39;!&#39;</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">);</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">[](</span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">auto</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">&amp;</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"> x</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> st=
d</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify">cout </span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">&lt;&lt;</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> x</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">}([:]</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify">t</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">)...;</span></div></code></div><br></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/8a0cf5fb-7a49-4cb0-95ba-c90583548303%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/8a0cf5fb-7a49-4cb0-95ba-c90583548303=
%40isocpp.org</a>.<br />

------=_Part_1682_332301284.1488833666583--

------=_Part_1681_2116514708.1488833666583--

.
