220 23686 <n73car$r06$1@ger.gmane.org> article
Path: news.gmane.org!not-for-mail
From: Matthew Woehlke <mwoehlke.floss@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: n4428 and Tuple-like access interface reflection
Date: Tue, 12 Jan 2016 12:15:07 -0500
Lines: 52
Approved: news@gmane.org
Message-ID: <n73car$r06$1@ger.gmane.org>
References: <56770133.7070701@wanadoo.fr> <5681D877.3010101@wanadoo.fr> <43daa6cd-e152-43c1-ab51-0661779d344b@isocpp.org> <n5ug1h$fgg$1@ger.gmane.org> <CAB+4KH+bBEwFidv=a5wuOLbyBtSTwy0TKB=r_7Mc_8vx_bRrPA@mail.gmail.com> <n60u6u$7ov$1@ger.gmane.org> <568942A9.80700@wanadoo.fr> <n6e4n4$q68$1@ger.gmane.org> <568B0DA1.3080704@wanadoo.fr> <b98e9903-52b2-41b4-ac89-8c3e8df4d9c1@isocpp.org> <n6gnfr$57q$1@ger.gmane.org> <7d4bd204-e4c3-4f60-8be5-63d8127daf74@isocpp.org> <n6grh7$b8q$1@ger.gmane.org> <487ea013-6fcb-4d2e-8bc7-8fe96cdbf0a9@isocpp.org> <568C3EC7.8070900@wanadoo.fr> <a6ad88f3-2309-499a-aeca-834ecb0dfd0d@isocpp.org> <568D5959.9000501@wanadoo.fr> <c087a17d-6ab0-40d3-acd7-e7c364edd388@isocpp.org> <568D8DD7.30303@wanadoo.fr> <d29c1908-3f42-4047-8802-6bf2fb4942f0@isocpp.org> <568E0C83.7030609@
 wanadoo.fr> <c81edceb-0ea1-46e8-ba26-024586f64a1a@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1452618932 1770 80.91.229.3 (12 Jan 2016 17:15:32 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 12 Jan 2016 17:15:32 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC37LBFWUIFBBKHJ2S2AKGQELEQRLRI@isocpp.org Tue Jan 12 18:15:25 2016
Return-path: <std-proposals+bncBC37LBFWUIFBBKHJ2S2AKGQELEQRLRI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f70.google.com ([209.85.215.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC37LBFWUIFBBKHJ2S2AKGQELEQRLRI@isocpp.org>)
	id 1aJ2XU-0000Py-4T
	for gclcip-std-proposals@m.gmane.org; Tue, 12 Jan 2016 18:15:24 +0100
Original-Received: by mail-lf0-f70.google.com with SMTP id m196sf22403824lfe.0
        for <gclcip-std-proposals@m.gmane.org>; Tue, 12 Jan 2016 09:15:23 -0800 (PST)
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
         :content-type:user-agent:in-reply-to: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=ch06VBqqBOkwMYus67whTSccNsH1DBMg38sv9nSCAXQ=;
        b=tAMnQdSy7FEvDkqlEDXbqOh2klEMMg7zOPiinBtLdpT0yEHqkYdMtpOyov+0Tznki7
         kEAoUSDoH3cvDvzyGpbtvwAbyAdX0vDedac5T3utiGI7ohEjE+UbbqwYsY9BducZrn3p
         XitpDoDyJo5pDRH6/hw3ySHazFlnhp1bGDhLhbQ2Loy1W1rRqGKAkXDlTmZK7bKgxFSe
         3Dr/PUzR0qu9dysA9YUzyAxwy24eYJy8alze6BRtG1qUGO9spMEfSOR9xS3W8i3cB+vZ
         9M08jcLoA6VNKgyKWIh3MuyEa08Zu6Jx3HkAwIrWrCB6Y8lHCZCJoxRexveGiEzybR2G
         EhD 
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:content-type:user-agent:in-reply-to: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=ch06VBqqBOkwMYus67whTSccNsH1DBMg38sv9nSCAXQ=;
        b=YajjAYAAoXJDoi14aQ+8XtUx3BSrL7+0IcaoH85DLUYNXjmvXC8xKaRNFj0m5pFfnI
         3cN9n3xG/Jkfy0GncC099ImkVqQhsHtgw2tt5DUj0pTQPvd4TNfMD+baBcbNGBURk3DF
         L4fDIn4Yp2y8U0pHphXe6CXwJ5d9JDz3Pjd51q8BhUB2JAwhVX6Y1CSCSD4L0vPXcaE2
         osMDkzpETrZL3wviqul/Ycu/Mi4eXR7VjD5kOs0/oh+GJDUeO/qg10FnmnJyX92tGPp6
         YfPTYGEF2T4X+EM94HGFFipBMw4UEEKe990Vtso7FCcFiwQdlz6oBwmHfZo1L6ciDAYI
         
X-Gm-Message-State: ALoCoQm/N5krJJGg66p/XVohHUvnNRaN4iq6ATwtEz1s9mPahPZzazQN/lztV/DMRxOaIyduMd6ibShfynhZ8tdqxLIAEuFKig==
X-Received: by 10.194.201.234 with SMTP id kd10mr6151922wjc.6.1452618922203;
        Tue, 12 Jan 2016 09:15:22 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.25.146.10 with SMTP id u10ls307880lfd.42.gmail; Tue, 12 Jan
 2016 09:15:19 -0800 (PST)
X-Received: by 10.112.136.103 with SMTP id pz7mr42264263lbb.3.1452618919408;
        Tue, 12 Jan 2016 09:15:19 -0800 (PST)
Original-Received: from plane.gmane.org (plane.gmane.org. [80.91.229.3])
        by mx.google.com with ESMTPS id p15si52938343lfp.167.2016.01.12.09.15.19
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=AES128-SHA bits=128/128);
        Tue, 12 Jan 2016 09:15:19 -0800 (PST)
Received-SPF: pass (google.com: domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as permitted sender) client-ip=80.91.229.3;
Original-Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1aJ2XN-0000LY-S1
	for std-proposals@isocpp.org; Tue, 12 Jan 2016 18:15:18 +0100
Original-Received: from tripoint.kitware.com ([66.194.253.20])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Tue, 12 Jan 2016 18:15:17 +0100
Original-Received: from mwoehlke.floss by tripoint.kitware.com with local (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Tue, 12 Jan 2016 18:15:17 +0100
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 43
Original-X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: tripoint.kitware.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
In-Reply-To: <c81edceb-0ea1-46e8-ba26-024586f64a1a@isocpp.org>
X-Original-Sender: mwoehlke.floss@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as
 permitted sender) smtp.mailfrom=gclcip-std-proposals@m.gmane.org;
       dmarc=fail (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:23686
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/23686>

On 2016-01-07 14:24, Nicol Bolas wrote:
> On Thursday, January 7, 2016 at 1:58:16 AM UTC-5, Vicente J. Botet Escriba 
> wrote:
>> My question was because as I interpret 
>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0017r1.html from 
>> the examples, The aggregation must be nested as in
>>
>> struct base1 { int b1, b2 = 42; };
>> struct base2 { 
>>     B() {
>>         b3 = 42;
>>     }
>>     int b3;
>> };
>> struct derived : base1, base2 {
>>     int d;
>> };
>>
>> derived d1{{1, 2}, {}, 4};  // full initialization
>> derived d2{{}, {}, 4};      // value-initialized bases
>>
>> But maybe I'm wrong.
> 
> No, you're right. I'd forgotten that this is how it works, that base 
> classes are considered member-subobjects.

Likewise. It... feels strange to me, but I guess it is what it is.

> But my overall point stands: it should work as the exact opposite of 
> aggregate initialization. So in your example, the first index of the tuple 
> `A` should be the `A1` base class. The second index should be the `A2` base 
> class.

Agreed.

> And actually, that brings up a really good reason why we should exclude 
> virtual types of any kind. Because such accesses (particularly structured 
> binding) encourages *slicing* of types.

Yup :-).

-- 
Matthew

-- 

--- 
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.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.

.
