220 34271 <oodqev$t5m$1@blaine.gmane.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Larry Evans <cppljevans@suddenlink.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Idea: Extension of structured bindings to
 definition of structs
Date: Sat, 2 Sep 2017 03:36:17 -0500
Lines: 38
Approved: news@gmane.org
Message-ID: <oodqev$t5m$1@blaine.gmane.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>
 <CAGg_6+MPQTnqdWLQ1UV8jF173jDXYQQx-abwwNV3v3iknocJ=Q@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"; format=flowed
X-Trace: blaine.gmane.org 1504341334 6948 195.159.176.226 (2 Sep 2017 08:35:34 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 2 Sep 2017 08:35:34 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.1
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDAYTI72VMGRBSO2VHGQKGQE623YDYY@isocpp.org Sat Sep 02 10:35:19 2017
Return-path: <std-proposals+bncBDAYTI72VMGRBSO2VHGQKGQE623YDYY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr0-f199.google.com ([209.85.128.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDAYTI72VMGRBSO2VHGQKGQE623YDYY@isocpp.org>)
	id 1do3tc-0000vj-Mu
	for gclcip-std-proposals@m.gmane.org; Sat, 02 Sep 2017 10:35:16 +0200
Original-Received: by mail-wr0-f199.google.com with SMTP id p37sf641653wrc.9
        for <gclcip-std-proposals@m.gmane.org>; Sat, 02 Sep 2017 01:35:23 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1504341323; cv=pass;
        d=google.com; s=arc-20160816;
        b=CqEpKiQQtsjdGWDXp9I68LmyR3Q6QBUpzUPdG99erebC7XzSN1Th1ntY3hkyezvsL8
         Hili9+5Yo+HQ4w1w58asYeE4V595zPEjDCgHvmok/8cdEO7QyvJ7nZxXCLLwJ1/OLFuL
         b2Jp+fLgLNdWkx16sHp3B4K+ChzbKSVF73M1K3jy2c/cpag9vObC7VR9qLcpJIrKzyBg
         hYLfFSn6g9SJmbWqU4/GLz7kzbshw5VSWtAqMMGoz+xHc0WKe1v2DBcpYzsZt2DpdnJB
         oqBeOSzonEvSwTI/Ola966mhtNbmryO78G73FHypJGvLIAXsSMZYf2Lu9Y22KP8P6WCe
         eDQg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-language
         :in-reply-to:user-agent:mime-version:references:message-id:lines
         :date:subject:from:to:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=0MoCrlfqz2d6eKSzxpPttctTHrPcdg3FAaGdGXOG7lE=;
        b=bCRgyVa/GKFGPRv9eL35B76jn3u7qsc2MGCw0nWqoOZXMOFRa8mNGAesPGmPPf1ZH0
         gVWpw7iHvI3CeN5FNmeSTMpyRx7710hL+xL+Qn9DQ4FvxLPzZkSToVunF7eqKx9flXIX
         0otkiePqBcnuPOkjq2svASPWKeguZ/ZtMS54CvJY+AuTbAJJL9TxC8lyTfZw1QbYq000
         xmWr2/83KQu3pZl3a3Xgs/88m34GsZgIOFPxbedvFq7PcEhpGBLrBr9kfRgUkOCNnvVG
         nsgO6UP1kQfWe1/yGekob/7XevMaHi8EFzIh25Zx3vi0MFhe2W23vna9YD1hZpWnfUqH
         hq5g 
ARC-Authentication-Results: i=2; mx.google.com;
       spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=to:from:subject:date:lines:message-id:references:mime-version
         :user-agent:in-reply-to:content-language:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=0MoCrlfqz2d6eKSzxpPttctTHrPcdg3FAaGdGXOG7lE=;
        b=FmmCkr66MxotXpJw8RbmTLUupcjjaeWxtTNN1UwB2v7Tf9Lm0Ww5jSJd3MbVVcqe+4
         0gRV4uxTytlnQIyIczI7BVQ/kafh0hM2FVWrxCtBJE1od3G3agXdlxs8jUgRejUfMbZn
         w5O6SrTe4hYm6EPVSxWv40v3a2iduLWLYGf/sMgak+eudkaXZE38wH7u+SWwxhQITmVZ
         mUEy82DD+6JVscEYDbe3ZRejP1UMFlbmDrwQ4uKE/MfUp5oVEfLit2/ZYR4lOdD7ei7Y
         hEVI0FwEGaOUboQIiS0dyEaU4VApaQOdL12yuLsPTqqe2qqpTJgONPh7JRR0NlUzyXS5
         i0Rg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:user-agent:in-reply-to:content-language
         :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=0MoCrlfqz2d6eKSzxpPttctTHrPcdg3FAaGdGXOG7lE=;
        b=CIoLSNIn09KVx4bOIHF7DCh3BHIK2p+WLO3ErsaQzB9Lg7rh9cQaLWsYcBTSce5W2x
         HCQbqzby31hRFzQ7OI5YKCAbz+4Wpw1DlXk1djRYmwf40g2RArDdPFQ+qtaWkoASWdlS
         dZOxomob2pDu/xapwvZMvKjQQw7CPhEDKhQmb9zLgNhgYEV7MRr0JEPsZwM/OWrGqbLq
         L4nM5uVMSd0whkQQ5Sh/1+z4B9fr3klczSWABZqNlbTr606Bh9ySGcQWUKBBbIPVBGB2
         j8g3hGF2QaEQw2tYJA5A+WouYkyowhV09Ahsx1ocXy9sisCyyhMqHKRrJGGFe1n56Qis
     
X-Gm-Message-State: AHPjjUgKm/iFp4M1gk66FVjq/e8JcKYwSM+XhVz+XnFaBrjlIbvY40+U
	7qiS13h1Scmz7Q==
X-Google-Smtp-Source: ADKCNb5VYcvqBd8qebT467MZdLNfRspTiQA2pEGFLya4SEpprmJM5lNtTYkJH+tas5Q0bTmTG1kEkw==
X-Received: by 10.28.11.131 with SMTP id 125mr62231wml.20.1504341323666;
        Sat, 02 Sep 2017 01:35:23 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.46.21.10 with SMTP id s10ls86902ljd.51.gmail; Sat, 02 Sep 2017
 01:35:21 -0700 (PDT)
X-Received: by 10.25.99.68 with SMTP id x65mr2045438lfb.41.1504341321572;
        Sat, 02 Sep 2017 01:35:21 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1504341321; cv=none;
        d=google.com; s=arc-20160816;
        b=T0sC38k2qsDKPCQp+jy9hSoGclV+Vib4nNv7EFS8EWoBG2qH9SKC+oyW2DvKZpf15H
         EdIU7p5pVHlT50XM2b137EYgTsnYXcIsyf7qdEfPt5RpJ4987kLeGPXPaZOUBrDTClUB
         nzZb+gR3QNGOTxo+Uiye8AaQpTZGcCQNAeKbWTuvkYYpvabN6SqPXOzToPYo3sswNPGh
         Vf8dBEdkEHJuEeFg/F8UxTLWL5LYh6dyGeXU0eO6OwqoOo+t2FD12uEF3LdUnmG+cZ11
         4VuSZTL3cO7rJrL0zRlPy2jk65wGE/jWiCtcxgUgBS9H3RmJcBWb8W95Zv78+qld3T4K
         ANwg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-language:in-reply-to:user-agent:content-transfer-encoding
         :mime-version:references:message-id:lines:date:subject:from:to
         :arc-authentication-results;
        bh=jpq3WDzU7vNKBugHQJu5YQC1fJWKSkxF/O0i/EZbYRM=;
        b=umgUQGjE+oFRr+ngGdFrNMuG/km3JJflYC9v8Or9PFHp5DBBu7x7Vylajbi6LR8Y8c
         lO5Rcpppl2r6zvUfXxaGUTCzMLbfS6jfKGPUQZGsvi801cuqObhLqWoT5VNO2xvDB4BE
         QagX1JtsR5QEHzJM7Sa2KRDa4Afu4Jxckm/dDhlALTRo+DqXeWUVKcYRq7L62e15Qor3
         VxolTW2lZvoL1xyxDj1sxNvXGPW/kOq7ihW1FGKnnesUrTzQlR+9gI1qk5Dd74kZwc09
         3Evaq12Qo6xUJkieoGbBIzTFe9RawzWQAbKT6mLPhyBORlLh4edlzFaiVZUizQD4uN1k
         yy4A==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.org
Original-Received: from blaine.gmane.org ([195.159.176.226])
        by mx.google.com with ESMTPS id 26si776215ljw.279.2017.09.02.01.35.21
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 02 Sep 2017 01:35:21 -0700 (PDT)
Received-SPF: neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) client-ip=195.159.176.226;
Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1do3tL-0000C9-QR
	for std-proposals@isocpp.org; Sat, 02 Sep 2017 10:34:59 +0200
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 31
Original-X-Complaints-To: usenet@blaine.gmane.org
In-Reply-To: <CAGg_6+MPQTnqdWLQ1UV8jF173jDXYQQx-abwwNV3v3iknocJ=Q@mail.gmail.com>
Content-Language: en-US
X-Original-Sender: cppljevans@suddenlink.net
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 195.159.176.226 is neither permitted nor denied by best guess
 record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.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:34271
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/34271>

On 08/30/2017 10:16 AM, Nevin Liber wrote:
> On Wed, Aug 30, 2017 at 2:59 AM, Eyal Rozenberg <eyalroz@technion.ac.il>
> wrote:
> 
>> You would be using an unnamed struct for the same reason you use an
>> "unnamed type" for non-struct variables with auto. We write:
>>
>>    auto x = expr;
>>
> 
> Even though you don't spell it out, that type already has a name.  auto
> doesn't create a new type.
> 
> You are proposing yet another syntax to create a new type.  As for its use,
> about the only thing you can do with it is pass it to a template function
> (or equivalent).  That use seems fairly marginal.  You need much better
> usage examples for motivation.
> 
Boost spirit has a macro, BOOST_FUSION_ADAPT_STRUCT, which maps a tuple
to a struct, as explained here:

http://ciere.com/cppnow15/x3_docs/spirit/tutorials/employee___parsing_into_structs.html

What the OP is proposing *seems* to obviate the need for
BOOST_FUSION_ADAPT_STRUCT.

That's one real world motivation example, IIUC.

-regards,
Larry


-- 
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/oodqev%24t5m%241%40blaine.gmane.org.

.
