220 28528 <073a7698-1388-4858-b6fa-b2b62a4fb6f1@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 06:49:33 -0700 (PDT)
Lines: 97
Approved: news@gmane.org
Message-ID: <073a7698-1388-4858-b6fa-b2b62a4fb6f1@isocpp.org>
References: <201610051238.17863.marc.mutz@kdab.com> <201610051300.02280.marc.mutz@kdab.com> <CAKgx6B+kywTPwYVRt3P5KDQ_=xMUuHzSJv6x21L5j1ExPz6bkQ@mail.gmail.com>
 <201610051411.30312.marc.mutz@kdab.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_4413_768177591.1475675373607"
X-Trace: blaine.gmane.org 1475675397 25305 195.159.176.226 (5 Oct 2016 13:49:57 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 5 Oct 2016 13:49:57 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDEZH3XFPIIO5COUX4CRUBCZHXJFI@isocpp.org Wed Oct 05 15:49:52 2016
Return-path: <std-proposals+bncBDEZH3XFPIIO5COUX4CRUBCZHXJFI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qk0-f198.google.com ([209.85.220.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDEZH3XFPIIO5COUX4CRUBCZHXJFI@isocpp.org>)
	id 1brmZn-0004GK-Cg
	for gclcip-std-proposals@m.gmane.org; Wed, 05 Oct 2016 15:49:39 +0200
Original-Received: by mail-qk0-f198.google.com with SMTP id o68sf47909163qkf.3
        for <gclcip-std-proposals@m.gmane.org>; Wed, 05 Oct 2016 06:49:41 -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=uAExyyyurFIpcnad4PHdgE9X0/OO152QG3XSGJQBA3Q=;
        b=u3RHbqRTvxFBQTwz93iCrrEwSsPfYWqsPOqdjyoRL+EsNu3J3q+xc/zBIzzhqfvhS0
         7s9irDq0WyJLPc649AJDABY0pUot0cR4pg3rDqfb9g82STeFIJHdlXYD5sQR8VE1A6ln
         /ClNF/UGWJ2ioiqm3LVlho1E3mqhSuEr1T0CI5xl8m1swxjPK4205doUAJShHmns9UYq
         2kV0sDRJvLnP7iosSwX+HrNKyMGEu2St08V2EvdHGKL9ceadXYCdTcdZZVK9WToDNerw
         hHuG6fza8AwVwe3L3MsChJWDGNQWliqNMckvdmWQQ3F6HSQUlT7tIMy8gM+AGKSYMDAN
         MidA==
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=uAExyyyurFIpcnad4PHdgE9X0/OO152QG3XSGJQBA3Q=;
        b=mu2qPPnEle/RE+HNTw8+9QzPZ73i1kFNfPFinPTPewTm2qvVenyns+aqgxb7U6uNGM
         3NUO9Wz0sSg985vZ1YWCiHSVYStoINosPHOnxVhmyr5QNn3QJa7/xA40n+tmF8te2osT
         pYQ/ox8+UkRwZLJOiUw74nyIu9aK2u7QXx7mMRICqGXlfkSMnISA3HE4ccihG5ZKjmHx
         TaPqDk6TxlYim5LSS3+TeNA8sF7+4/GIIYw9/IMH+xkx/ojLXWRV1un2BID7bjPAwDBt
         6vyYl3NNT/1+Us2oUPpSHiNfauYaZknTS/KFon9aZNe5lalNfDVILhnaIQA5Dad56AOH
         iljA==
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=uAExyyyurFIpcnad4PHdgE9X0/OO152QG3XSGJQBA3Q=;
        b=AWHvDcDG/Mdxb2ILy2DAgpbV1x+NkWCahA8Nag5Iq0ITI8zxnK3wGcMViSNnebPGfe
         W+cNxynLrXcCmsqKWdC7tQpJdQaLYP8m1dYefzlpfttpCSs6Zap/4UdVUwHNhpY1xgnE
         LwEdu/11+ryRzRIebYnpqxf0bqzJrHWP+lbyS56lilKxALJlijV7fJuDnhMNIBCcwQXR
         dK0b4trrHZtEzW5fmDu2P094FEoRSidGQJRaN2EMuQXO1jF5v95od1sBwfLf3HYAwa4K
         ltsNoKoY2iX0tsHlDPwpZABynbmyWCpYUb2YfzgRCTyuun2ithLhV+q99ss/FYrkQyd2
         ORiA==
X-Gm-Message-State: AA6/9Rku9zRrHo/ig030AUSFWJCtvjEx+kV9hOTR1zl27Z0EzqIV4CulWM9KUe49lJHcPQ==
X-Received: by 10.157.19.117 with SMTP id q50mr2385429otq.54.1475675381121;
        Wed, 05 Oct 2016 06:49:41 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.66.11 with SMTP id i11ls386237itb.12.gmail; Wed, 05 Oct
 2016 06:49:34 -0700 (PDT)
X-Received: by 10.36.117.6 with SMTP id y6mr666170itc.7.1475675374279;
        Wed, 05 Oct 2016 06:49:34 -0700 (PDT)
In-Reply-To: <201610051411.30312.marc.mutz@kdab.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:28528
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28528>

------=_Part_4413_768177591.1475675373607
Content-Type: multipart/alternative; 
	boundary="----=_Part_4414_191914130.1475675373607"

------=_Part_4414_191914130.1475675373607
Content-Type: text/plain; charset=UTF-8

On Wednesday, October 5, 2016 at 8:09:43 AM UTC-4, Marc Mutz wrote:
>
> On Wednesday 05 October 2016 13:40:20 Domen Vrankar wrote: 
> > So you're saying that returning a structure with error status and result 
> or 
> > multiple results of which you only need one or two (reason being for eg. 
> > cheaper to return all at once - due to for e.g. web service call or 
> complex 
> > processing - than request one by one on need to basis) you would still 
> > prefer dragging the entire structure around giving the feeling that your 
> > code has more dependencies than it actually does?
>
> One of us is not underatanding SB correctly, or I don't understand you. SB 
> stores the whole struct, too, it just defines local aliases to the member 
> of 
> the struct (or tuple, or pair, or ...). 
>

Only if you say that you want references, using "auto &" or "auto &&".  If 
you use "auto", you just get copies.


   - If the *assignment-expression* is a prvalue, *e* is an xvalue that 
   designates a temporary object copy-initialized from the 
   *assignment-expression*. The lifetime of the temporary ends immediately 
   after the last variable declaration (see below) if no & follows the 
   *decl-specifier-seq* in the decomposition declaration, and is extended 
   as usual (12.2 [class.temporary] otherwise.

-- 
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/073a7698-1388-4858-b6fa-b2b62a4fb6f1%40isocpp.org.

------=_Part_4414_191914130.1475675373607
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, October 5, 2016 at 8:09:43 AM UTC-4, Marc Mu=
tz wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: =
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On Wednesday 05 Octob=
er 2016 13:40:20 Domen Vrankar wrote:
<br>&gt; So you&#39;re saying that returning a structure with error status =
and result or
<br>&gt; multiple results of which you only need one or two (reason being f=
or eg.
<br>&gt; cheaper to return all at once - due to for e.g. web service call o=
r complex
<br>&gt; processing - than request one by one on need to basis) you would s=
till
<br>&gt; prefer dragging the entire structure around giving the feeling tha=
t your
<br>&gt; code has more dependencies than it actually does?<br><br>One of us=
 is not underatanding SB correctly, or I don&#39;t understand you. SB=20
<br>stores the whole struct, too, it just defines local aliases to the memb=
er of=20
<br>the struct (or tuple, or pair, or ...).
<br></blockquote><div><br></div><div>Only if you say that you want referenc=
es, using &quot;auto &amp;&quot; or &quot;auto &amp;&amp;&quot;. =C2=A0If y=
ou use &quot;auto&quot;, you just get copies.</div><div><br></div><div><ul =
style=3D"color: rgb(0, 0, 0); font-family: Times; font-size: medium; font-w=
eight: bold;"><li>If the=C2=A0<em>assignment-expression</em>=C2=A0is a prva=
lue,=C2=A0<em>e</em>=C2=A0is an xvalue that designates a temporary object c=
opy-initialized from the=C2=A0<em>assignment-expression</em>. The lifetime =
of the temporary ends immediately after the last variable declaration (see =
below) if no=C2=A0<code>&amp;</code>=C2=A0follows the=C2=A0<em>decl-specifi=
er-seq</em>=C2=A0in the decomposition declaration, and is extended as usual=
 (12.2 [class.temporary] otherwise.</li></ul></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/073a7698-1388-4858-b6fa-b2b62a4fb6f1%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/073a7698-1388-4858-b6fa-b2b62a4fb6f1=
%40isocpp.org</a>.<br />

------=_Part_4414_191914130.1475675373607--

------=_Part_4413_768177591.1475675373607--

.
