220 31819 <14211602.1P4LjlnQMh@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: This variable should not be named: an identifier
 (not) to remember
Date: Tue, 28 Mar 2017 09:43:20 -0700
Lines: 35
Approved: news@gmane.org
Message-ID: <14211602.1P4LjlnQMh@tjmaciei-mobl1>
References: <985b9b2a-c734-45eb-95f4-db4dc0d309a1@isocpp.org> <CAF3xnJSBMmyno-AksyJJz5W=K4J=uY-ynYys3+v=mf5EzCp07w@mail.gmail.com> <CAGsORuC7LZWWtCnr9Zuoqc=zzQOeNT-KZimy6BNO+u_h3in6cA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1490719413 15115 195.159.176.226 (28 Mar 2017 16:43:33 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 28 Mar 2017 16:43:33 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBMNF5LDAKGQE2J3JTJY@isocpp.org Tue Mar 28 18:43:28 2017
Return-path: <std-proposals+bncBCB4TK757YBRBMNF5LDAKGQE2J3JTJY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f71.google.com ([209.85.215.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRBMNF5LDAKGQE2J3JTJY@isocpp.org>)
	id 1csuDN-0003Hk-6Y
	for gclcip-std-proposals@m.gmane.org; Tue, 28 Mar 2017 18:43:25 +0200
Original-Received: by mail-lf0-f71.google.com with SMTP id k199sf34491023lfg.16
        for <gclcip-std-proposals@m.gmane.org>; Tue, 28 Mar 2017 09:43:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:message-id:in-reply-to:references:mime-version
         :content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=YH8OY42Kw8BrqPTpGKrXlnuRmhC/o40hpEYQUK48LpI=;
        b=rYNqDHPPFUL31m11gJjGBvo9D/CBfYoIGxg0mowQw1zWn6oAUeN47+z0lpTWMPxMxt
         Qtgia8TVHBoPMb09hsALKxiELFZewTb2vLFCK48yp0faD7IkHcNvcNSNTnAXsoag7CxR
         tTt/vVkgXZ6e5sCUd0h7qUb/JNi+NxQ4kAvYYwFifm8LClXW7T9q95ytlIpxBAYez8Wi
         vzNKUVqTvkaGVz7CjMWh2n622Vl+kocGeT247VeRYJYuslKBsfNvaJ1Gqb9+R9FG8zVN
         lzwcFq+h/QY8SyWZtTmdgUITMmWyKdMsPF0ap/lDpYkw9prxlOc43CKvfqINfghwmtKd
         mGzQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
         :references:mime-version:content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=YH8OY42Kw8BrqPTpGKrXlnuRmhC/o40hpEYQUK48LpI=;
        b=WSFdy7JZq4qnLGymyz/kzz4tx5M9u4so8EezdO7VdHljcYqY4ni41oZukSkqgig8h2
         bBAP/zxHnz8pEOLQFBpzBbOEHFGzD3nOSr8LYGfJ4VSnkFODeDugFtmLoG2LKE+lm+9+
         xEKA1nr4KyZBvMmHZWgZZbubxvHlWdyZuSyG4c2vbJIu9eD8YUcf/IeNlt+/Xm1GWprU
         AZNukMAs++UiOChDYNbjBNHQALRMxc8p8ZM0csnEPMqnbQbNIdronaZP80QYpL8XnIhe
         SgysCjxOxBhdq+PEIuEk55USohkS7Gt33FD57Eq+T5hVtB9qNEGh62B4gCcqFtY19VMC
         QND 
X-Gm-Message-State: AFeK/H0QMttJiIXPUfmByjB8leDehWPOPE3azCTFhMuteeppdKN3iqkIXrW+x9WCaMBckg==
X-Received: by 10.46.1.12 with SMTP id 12mr669208ljb.30.1490719411540;
        Tue, 28 Mar 2017 09:43:31 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.25.227.79 with SMTP id c15ls1380053lfk.49.gmail; Tue, 28 Mar
 2017 09:43:29 -0700 (PDT)
X-Received: by 10.25.242.1 with SMTP id q1mr13761394lfh.22.1490719409677;
        Tue, 28 Mar 2017 09:43:29 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id v1si2160810ljd.154.2017.03.28.09.43.29
        for <std-proposals@isocpp.org>;
        Tue, 28 Mar 2017 09:43:29 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) client-ip=78.47.120.188;
Original-Received: from tjmaciei-mobl1.localnet (unknown [134.134.139.78])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 9BBAE11B82B
	for <std-proposals@isocpp.org>; Tue, 28 Mar 2017 09:43:28 -0700 (PDT)
In-Reply-To: <CAGsORuC7LZWWtCnr9Zuoqc=zzQOeNT-KZimy6BNO+u_h3in6cA@mail.gmail.com>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
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:31819
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31819>

On ter=C3=A7a-feira, 28 de mar=C3=A7o de 2017 09:27:34 PDT Zhihao Yuan wrot=
e:
> here you mean to *preserve* the result object, but when
> you write
>=20
>   auto [__, a] =3D get_tuple(...);
>=20
> you mean to *ignore* a part of the result object, so
> physically, just like std::ignore, I don't expect __ here
> to issue a call to get(obj), nor an access to a subobject.
> I don't think the *preserving* semantics can fulfill the
> *ignoring* demand.

It has no difference, because the structured binding is actually a *binding=
*,=20
so there's difference to object creation or retention. The result from=20
get_tuple is assigned to an anonymous object and all its members are retain=
ed.=20
Then it's decomposed into two elements: an anonymous one (can't be accessed=
)=20
and a.

--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

--=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/14211602.1P4LjlnQMh%40tjmaciei-mobl1.

.
