220 34253 <af0af198-5a2e-4ba1-8045-9b6c40e978b5@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: the.ultimate.koala@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Idea: Extension of structured bindings to
 definition of structs
Date: Fri, 1 Sep 2017 00:27:03 -0700 (PDT)
Lines: 107
Approved: news@gmane.org
Message-ID: <af0af198-5a2e-4ba1-8045-9b6c40e978b5@isocpp.org>
References: <59dcbbbc-c536-4b7b-9c88-0638fb0cd58a@technion.ac.il>
 <7b9bf263-d3ca-42bf-aed6-4c7606782a28@isocpp.org>
 <1762295.OciJaA9sdk@tjmaciei-mobl1>
 <ff2ceb41-caca-4659-9a7d-4da9c2046810@isocpp.org>
 <74349bfe-bb5a-a2ce-4142-5d46103d1d9f@technion.ac.il>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1530_1328492068.1504250823178"
X-Trace: blaine.gmane.org 1504250840 22603 195.159.176.226 (1 Sep 2017 07:27:20 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 1 Sep 2017 07:27:20 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDIODEPKWANBBR4XUTGQKGQEFURDSUI@isocpp.org Fri Sep 01 09:27:11 2017
Return-path: <std-proposals+bncBDIODEPKWANBBR4XUTGQKGQEFURDSUI@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+bncBDIODEPKWANBBR4XUTGQKGQEFURDSUI@isocpp.org>)
	id 1dngLy-0004jP-Cm
	for gclcip-std-proposals@m.gmane.org; Fri, 01 Sep 2017 09:26:58 +0200
Original-Received: by mail-yw0-f200.google.com with SMTP id s128sf6871243yws.10
        for <gclcip-std-proposals@m.gmane.org>; Fri, 01 Sep 2017 00:27:05 -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
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=vWVq/kmAFlR0IL4ExFHViyctV3sYaARr0n7wLMMa6R8=;
        b=mpc1PPTEdOyAxBfRcQOjclfXouaTBpalTEma4G+CqIT0QzFy3y/fcSDTySVsH1l59T
         KkWojqkdRw+mpTU/N9G8gA0OVI8UQQm/jtKT2ZvS3oPmd43VfiwAbXLPpkAQ28kkoGP+
         vp6d9GnzphhaxzPgIqxXfScJRpTZc1FgfJ+/9aPJ28tQfz4MARYFnwNQAVBvn5H091us
         09IcX9c2LdHFQyv72R/BL7lOGj+62kw6/QiqDUOG5ILu3CS7vws6ifX/6lA2DrqK2D5O
         pxZ3/SQwYgFbl5pv18vtMc+VyLrJeDpwV/QNqwWJPPXjVDHcc8pG5ryG8Cav16hseUpv
         GtZw==
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
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=vWVq/kmAFlR0IL4ExFHViyctV3sYaARr0n7wLMMa6R8=;
        b=Gqtt1/+k8y4sinimmLot1OqPmbW8LDp+CM0OOoAz+4ptde5PQhCiTIR25O3VLXGHDg
         z3SSli5svPF+aJ6dJdt1iT+iCrTtaNAGcBM25Mw7f4ODilbnkAkkmWsQpR60dAoGv5Op
         9ipJw2fGqHxlJUlqejsH6iv2OT+yBnXuVPlxeWi3mNRBoN2VrCzjuzqL6whBdzDXWWmm
         guUbshjTB8MudKOkdZkFEnon4eMSUWLtJL4XWQssT0wU/Zwda/VUUY78CEzjghSP00Cm
         kiD5OiCuBC1hszXJyNcBQYioxr8/UbOch5+NsBn0Qtx8Ijpi/rE7khGtrsCwKUscRkJv
         IHfA==
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=vWVq/kmAFlR0IL4ExFHViyctV3sYaARr0n7wLMMa6R8=;
        b=Q19oQ0HacBbpvTBvbt8sMFO6kb0PMD40htCuqj9JHrMckY9ILvTuU/LBp7azkN90b/
         PTAWL43Owy3uoi1VbQ59YZQDpV9jtphY6QQsuvQFk4jS3D5/r9ncA7HeiYg90Is63TQw
         9M9YbEIYnjcQ9ukhDatgcOLHr6SkBHifPGHU913UR/P0wubTEpzk69ydMFtwGSEBnqSL
         i4+SplvtXI4tQMb/88WF6+JVcIsksp6da+oMw/nd6FOHJgjCoK+Aj4TLb88/tIu+QCbH
         c5z87dPciTVJKOrjGJxDKlWuSzNqoIbnPBr8Efx2u3IyHBzdic0bOOYCpem11lLyyj9K
         qd7w==
X-Gm-Message-State: AHYfb5hKjAWD+cKDtULdfrJQA2rb7DXMyQGQ6NTB+/cbeOrWeC+KFgjM
	Oqa0n3KnZcGV2T7v
X-Google-Smtp-Source: ADKCNb4cqmFMewwBU6nEKtbGZO+56k2/rAESq83+Ja/Sr/kmvXaNFH1E5z6fjDdeQ678gz9i4M+e+g==
X-Received: by 10.129.161.6 with SMTP id y6mr5319261ywg.5.1504250825114;
        Fri, 01 Sep 2017 00:27:05 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.105.71 with SMTP id e68ls454663itc.7.gmail; Fri, 01 Sep
 2017 00:27:03 -0700 (PDT)
X-Received: by 10.31.199.65 with SMTP id x62mr72099vkf.9.1504250823692;
        Fri, 01 Sep 2017 00:27:03 -0700 (PDT)
In-Reply-To: <74349bfe-bb5a-a2ce-4142-5d46103d1d9f@technion.ac.il>
X-Original-Sender: the.ultimate.koala@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:34253
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/34253>

------=_Part_1530_1328492068.1504250823178
Content-Type: multipart/alternative; 
	boundary="----=_Part_1531_1876585170.1504250823178"

------=_Part_1531_1876585170.1504250823178
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable



Le mercredi 30 ao=C3=BBt 2017 09:59:43 UTC+2, Eyal Rozenberg a =C3=A9crit :
>
>  We write:=20
>
>   auto x =3D expr;=20
>
> although we could write=20
>
>   using whatever_t =3D decltype(expr);=20
>
>   // ...=20
>
>   whatever_t x =3D expr;=20
>
> except we do it for several values which are grouped together in a=20
> struct. The second option does the exact same thing, but it's annoying=20
> and verbose.=20
>
>
Maybe I don't understand auto and decltype enough, but in the first case :

int a =3D 5;
int& b =3D a;
auto c =3D b;

c has type int. In the second case:

int a =3D 5;
int& b =3D a;
using whatever_t =3D decltype(b);
whatever_t c =3D b;

c has type int&.

I may be wrong, but it does not "do the exact same thing" to me.

--=20
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 e=
mail 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/af0af198-5a2e-4ba1-8045-9b6c40e978b5%40isocpp.or=
g.

------=_Part_1531_1876585170.1504250823178
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>Le mercredi 30 ao=C3=BBt 2017 09:59:43 UTC+2, Eyal=
 Rozenberg a =C3=A9crit=C2=A0:<blockquote class=3D"gmail_quote" style=3D"ma=
rgin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">=
=C2=A0We write:
<br>
<br>=C2=A0 auto x =3D expr;
<br>
<br>although we could write
<br>
<br>=C2=A0 using whatever_t =3D decltype(expr);
<br>
<br>=C2=A0 // ...
<br>
<br>=C2=A0 whatever_t x =3D expr;
<br>
<br>except we do it for several values which are grouped together in a
<br>struct. The second option does the exact same thing, but it&#39;s annoy=
ing
<br>and verbose.
<br>
<br></blockquote><div><br>Maybe I don&#39;t understand auto and decltype en=
ough, but in the first case :<br><br>int a =3D 5;<br>int&amp; b =3D a;<br>a=
uto c =3D b;<br><br>c has type int. In the second case:<br><br>int a =3D 5;=
<br>int&amp; b =3D a;<br>using whatever_t =3D decltype(b);<br>whatever_t c =
=3D b;<br><br>c has type int&amp;.<br><br>I may be wrong, but it does not &=
quot;do the exact same thing&quot; to me.<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/af0af198-5a2e-4ba1-8045-9b6c40e978b5%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/af0af198-5a2e-4ba1-8045-9b6c40e978b5=
%40isocpp.org</a>.<br />

------=_Part_1531_1876585170.1504250823178--

------=_Part_1530_1328492068.1504250823178--

.
