220 38068 <pd4l26$4bv$1@blaine.gmane.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Phil Bouchard <philippeb8@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Fornux C++ Superset - Forward Declarations of
 Nested Structures
Date: Fri, 11 May 2018 17:48:54 +0000 (UTC)
Lines: 50
Approved: news@gmane.org
Message-ID: <pd4l26$4bv$1@blaine.gmane.org>
References: <cab4cada-1abe-48b2-9a4b-d6c9f994b805@isocpp.org>
 <CAOfiQqnoN-_KQ-AOTsAMCMnJK_nge1c59K0xOFy+u0jQEtFnOw@mail.gmail.com>
 <34fa23ed-1fab-44d5-92ab-217067b68225@isocpp.org>
 <75fb8736-b92a-480f-9a36-310b3e03b131@isocpp.org>
 <pd2ivq$saf$1@blaine.gmane.org>
 <228ebe66-fa3d-40e8-a42f-37de41834977@isocpp.org>
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 1526060951 6097 195.159.176.226 (11 May 2018 17:49:11 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 11 May 2018 17:49:11 +0000 (UTC)
User-Agent: NewsTap/5.3.1 (iPhone/iPod Touch)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCAYTFXFZMBBBFNQ27LQKGQEU2U4GYQ@isocpp.org Fri May 11 19:49:07 2018
Return-path: <std-proposals+bncBCAYTFXFZMBBBFNQ27LQKGQEU2U4GYQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f69.google.com ([209.85.215.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCAYTFXFZMBBBFNQ27LQKGQEU2U4GYQ@isocpp.org>)
	id 1fHCAF-0001Sa-J1
	for gclcip-std-proposals@m.gmane.org; Fri, 11 May 2018 19:49:07 +0200
Original-Received: by mail-lf0-f69.google.com with SMTP id e21-v6sf2101716lfi.21
        for <gclcip-std-proposals@m.gmane.org>; Fri, 11 May 2018 10:51:19 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1526061079; cv=pass;
        d=google.com; s=arc-20160816;
        b=xVMgEA0vkbc/0y9aj6PaXp7t0i39vl0Rl5T7Yh257bcYwQj9RzCHMwLmcHexxh0TpJ
         CFl8F3PspQfmCdgqYPATydu4I+MfzThqts9hzBPcssZKLL6gCngCbYWzDYUgoERpsK2P
         zQ/UIokstDlYUdtocMdkQp+mV56y11EQihrF+AkXUHC/6aqBBr3G+IiVD6zdh0RdmOd+
         5zdcuaymqXpwRpdIUYp/KqpowpSwgDHKyJibXkhDE0/v8MbKpfdUVdfx2IN4M6s1r8QT
         L4v8id5RBySSaVF387SBQsGQcJtFcoH6F/BJcCmNci1wr3vyqKJ0dlwKwZwmkNzsjr1v
         tZUA==
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:cancel-lock:user-agent
         :content-transfer-encoding:mime-version:references:message-id:lines
         :date:subject:from:to:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=BPZZFpjE+05JRqWAouP+q+Z9WB/01rRg3ClbCpoOZ+g=;
        b=FcBgZCCW3fvYRP0oxxpX+qmGC1l+kEQj2TPDwcg55uznHpLHmy+tmfQ7AK6nxjvWqu
         V2IaTfGbHTbUWqIYMEic8Tb4KDqIm0T4F1l/h0XUoSwf+9D8nm7UFtvQNsXA9pS0hRNN
         xC3pO7xaLEEeUwsrRXaz8Zccl83JrwqSD+F5tb0APWVqE4Iu0NKX2va/SOtztofuqLKL
         yriRhk+NyPeauiCb1wcKc9NlH+2v6Owl5YPIXZYHmXfpRD0YQHQFDccSHEMLU07HGRsZ
         K/Nu3q6APn3u+WhLDx3sj6zyLA72jHCFdRlMloSg6qj9OsNS4/9KD4pZh83lWXKc/ubv
     
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;
       dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
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-transfer-encoding:user-agent:cancel-lock: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=BPZZFpjE+05JRqWAouP+q+Z9WB/01rRg3ClbCpoOZ+g=;
        b=Ef/0Dp/4eUrdjwu0ragPVdPuaRYuMgdyqJK1KQ9iP8HN7NP6/bDoWxmN3Qv4w/xn0p
         MKOgm25pAmlidNSC59calISsDfw6jKe0EA7e499QsYT/tkjCxxHAFKaAOhRWLrQxL8qN
         soXmSCNaxw/AoNlhxsnzBvjxQLxPjxWyMUEAZTNQH/WTByFl0/hLrX7+X7jS3TcqOjI1
         s4ctJ24Zzf3grdxCYo7Jxz/PTRSLoot4gc8SYvZitmdHU7s8Acei3p5SGPlNZ5kYkLNa
         iQpCg/gOgVt+eSOPOA17YpoWd0DPseBLbmReeZIYUrDV+KPwlY8khr2xJpULUakIhDdr
         XPNw==
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:content-transfer-encoding:user-agent:cancel-lock
         :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=BPZZFpjE+05JRqWAouP+q+Z9WB/01rRg3ClbCpoOZ+g=;
        b=j2mrozdbu7TkotL15MgfHygGhn2wSXEH3x/mSsmSbmYrLvI9iADb/qcUY+5sUavneQ
         Siu7Q6SKBuaodKAKP3l1fvL+a7cYkk4x0mIBUphwa2bZDAnqp8GchfBnpi84NJV0ThwJ
         iw9Zn3+RxcO525nlJFNgpdScrV7g7TMKN0WeMzPEuku8DZkUZz0yVCIK0IhoidTvv3CP
         Ew4+Ip5uhmPTZrBC2SsvBQQVvErDcsEvRpnDxgVcR9ktS0J4XUZX/wZ5sakuRR4TVfOI
         TMgAj13IyK1H5/Hc2MurnzqAWecaan4o0e3QlWPNn9yWrcfYDvhjXkjuY78eS5Zw 
X-Gm-Message-State: ALKqPwfLpH26j5a1SS/HsPdPAwkz9Go5/fB7trvZRyoYhtkj4b6GjSKw
	ZY27aac+Frv4SjXSLLlYLcc=
X-Google-Smtp-Source: AB8JxZqMTg3sDYcqcay9kjV+ori+SGhUmRmyl1Z7EeU5q2xgcdIvfsmiZmineLRIZmB7sXl+Yf7l8Q==
X-Received: by 2002:a19:5313:: with SMTP id h19-v6mr191898lfb.30.1526061078925;
        Fri, 11 May 2018 10:51:18 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a2e:635a:: with SMTP id x87-v6ls1210593ljb.6.gmail; Fri, 11
 May 2018 10:51:17 -0700 (PDT)
X-Received: by 2002:a2e:9e57:: with SMTP id g23-v6mr4689447ljk.37.1526061077157;
        Fri, 11 May 2018 10:51:17 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1526061077; cv=none;
        d=google.com; s=arc-20160816;
        b=ZyD4jrgg3PsFj4YhrFiZWoYvsRHvLa3616d+Zir3MldNlWWBgYL8C1X+jzkkh2OYKq
         EYXlArDcS7rJdaguMyO96ho39xSsmk1DXCAj9DE3IoSh6qvqG3k0NER0kNkHk0oL+BC3
         hEGSsJ5EGNmngZ08TE+S+8U7xjk0N2mO7YpS9tEMmwttuCIgAeP024rZyDU9Hc/pIwLz
         JeNg6QlZx3vjoJgXIyHC/HHZeXA41pRKIpzXXa+V/Mj3OHjHveWNa2b7/AqtLSwtkezg
         9X7N0lkcdFHfdFzUZUAT0C9DSc9Q9DX+4UXd7ejeCZ9+tBTPBYfz+BsG25QPMfmzDbnn
         MF9w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=cancel-lock:user-agent:content-transfer-encoding:mime-version
         :references:message-id:lines:date:subject:from:to
         :arc-authentication-results;
        bh=u+8t6C2XeTKk69IOYBO/lY+yq16rdiiOdAv/lUKGDhE=;
        b=T4q6xgVwd2WTWYdihg15JwjsPke12pnJ1/9ZFgYm0uNHIDnStcMruuHr3dcgAWSZnK
         02g83vKRD+9p7xXJL5JpUxKzKtRVXOtPVp1lGdKbVaHp8FueWPhqk5602GCNlprz9j3M
         TEXbpal8zBR+a6YhnyynhLzltCkqCkt+IUz6av0KOcBr2GglICe0WauSNULVv9BCEMgo
         Q0WweTZrVwZkt+/IuVt4XVz3g7i4wW6h5AmWErK4I/AgLzMX3iZZbBWAAlvhZK4EAdtl
         zn/saX/UXh6ZIIRZ+QEaHTTK6xOsBGTzZEdJRQcC/jh/87QshhVM6C+L+sHtNwKrAH1x
         rxpg==
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;
       dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from blaine.gmane.org ([195.159.176.226])
        by mx.google.com with ESMTPS id h72-v6si1575524lfb.339.2018.05.11.10.51.17
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 11 May 2018 10:51:17 -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 1fHCA9-0001JE-0y
	for std-proposals@isocpp.org; Fri, 11 May 2018 19:49:01 +0200
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 34
Original-X-Complaints-To: usenet@blaine.gmane.org
Cancel-Lock: sha1:fJEzdYy4/P6avw2lIn+wt4f8NGM=
X-Original-Sender: philippeb8@gmail.com
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;
       dmarc=fail (p=NONE sp=QUARANTINE 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:38068
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/38068>

Bengt Gustafsson <bengt.gustafsson@beamways.com> wrote:
> I'm skeptical to partial declarations as the rules would be quite=20
> complicated. What I have found lacking on various occasions is the abilit=
y=20
> to declare inheritance in a forward declaration. Being able to declare=20
> inheritance relations early reduces the need of moving method=20
> implementations of methods out of the class head in certain situations.
>=20
> When it comes to friend declarations it seems that you would not be helpe=
d=20
> by including them in a forward declaration as their sole purpose is to=20
> allow access to private members _which have not been declared yet_.
>=20
> I would favor a proposal which includes your initial possibility to decla=
re=20
> a nested class after declaring the outer class (or for consistence with=
=20
> namespace A::B { ... } without having to do so) plus the possibility to=
=20
> declare inheritance in a forward declaration.

Ok so let=E2=80=99s forget about partial declarations and consider consiste=
ncy
checks.

But regarding inheritance; there would be no way to see if classes are
virtual or not without their members. This would prevent us from using
dynamic_cast on pointers. Ex.:

struct Y;
struct X : Y;

Y * p =3D nullptr; // fine
X * q =3D dynamic_cast<X *>(p); // error

This might be an obscur use case but worth mentioning.


Regards,
-Phil

--=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/pd4l26%244bv%241%40blaine.gmane.org.

.
