220 7921 <CAArVCkSN4ZgWC3Q45B4Wnxrb9ux609utgQ73q2p-Y17NYp=naA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Philipp Stephani <p.stephani2@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Limited inheritance for classes
Date: Sat, 23 Nov 2013 17:00:22 +0100
Lines: 66
Approved: news@gmane.org
Message-ID: <CAArVCkSN4ZgWC3Q45B4Wnxrb9ux609utgQ73q2p-Y17NYp=naA@mail.gmail.com>
References: <f04aeac5-ab5a-4508-ae69-196f53e7a6f8@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a11c3675e7032e804ebda3acf
X-Trace: ger.gmane.org 1385222420 31692 80.91.229.3 (23 Nov 2013 16:00:20 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 23 Nov 2013 16:00:20 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBD35NAXJW4GBBF5CYOKAKGQE6UGLVPQ@isocpp.org Sat Nov 23 17:00:26 2013
Return-path: <std-proposals+bncBD35NAXJW4GBBF5CYOKAKGQE6UGLVPQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wg0-f71.google.com ([74.125.82.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBD35NAXJW4GBBF5CYOKAKGQE6UGLVPQ@isocpp.org>)
	id 1VkFdB-00010p-1h
	for gclcip-std-proposals@m.gmane.org; Sat, 23 Nov 2013 17:00:25 +0100
Original-Received: by mail-wg0-f71.google.com with SMTP id b13sf3119937wgh.6
        for <gclcip-std-proposals@m.gmane.org>; Sat, 23 Nov 2013 08:00:24 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=BSieqDOGUIo0dwoUipO2+Y31qhzRB4FKjm/PufvXADA=;
        b=eTOUeuQCaAjiahJhhrpBjIDnSQ1QJrRWwcC4eUGcYt60pdX9fZ0evFQhzIx0hBEgBZ
         W1fC8tJ30n5J0gI6MBWzKiBlIhSq1mCFIjw0Q1AHgYG+hawSOzFAv/iwBEF7BzQDT2Cg
         mUMm9xUQEST4mkRCIYkRfUjSClGZPl1xrdQZSP42qWwFPETxmswe3VHvu3aQJSnZ0KDM
         uTFcSjoX/VsQuD84efynpS0Zn9wrDbeHv0XFFfhFO5PkUQTBai8KmVMVT6gog91PcEu7
         FOoQtBLuTjMSe9A6E4mYQzL4FPqLop2naCOe1vhiBFaiXGdFIb3OaL24OL0Si/yrjatT
         cRBg==
X-Gm-Message-State: ALoCoQlS66FMXltb6/qMhhNN1aDY6T33o/DXE59Kd+JLDYSDC/WN3Ao3e4moMDttWEWldea2M5V3
X-Received: by 10.112.202.193 with SMTP id kk1mr6928179lbc.17.1385222424188;
        Sat, 23 Nov 2013 08:00:24 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.95.167 with SMTP id dl7ls60723wib.34.gmail; Sat, 23 Nov
 2013 08:00:23 -0800 (PST)
X-Received: by 10.204.127.135 with SMTP id g7mr2136164bks.42.1385222423230;
        Sat, 23 Nov 2013 08:00:23 -0800 (PST)
Original-Received: from mail-la0-x233.google.com (mail-la0-x233.google.com [2a00:1450:4010:c03::233])
        by mx.google.com with ESMTPS id rj10si1819773bkb.222.2013.11.23.08.00.23
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sat, 23 Nov 2013 08:00:23 -0800 (PST)
Received-SPF: pass (google.com: domain of p.stephani2@gmail.com designates 2a00:1450:4010:c03::233 as permitted sender) client-ip=2a00:1450:4010:c03::233;
Original-Received: by mail-la0-f51.google.com with SMTP id ec20so1806965lab.10
        for <std-proposals@isocpp.org>; Sat, 23 Nov 2013 08:00:22 -0800 (PST)
X-Received: by 10.152.116.109 with SMTP id jv13mr1620050lab.30.1385222422670;
 Sat, 23 Nov 2013 08:00:22 -0800 (PST)
Original-Received: by 10.112.9.203 with HTTP; Sat, 23 Nov 2013 08:00:22 -0800 (PST)
In-Reply-To: <f04aeac5-ab5a-4508-ae69-196f53e7a6f8@isocpp.org>
X-Original-Sender: p.stephani2@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of p.stephani2@gmail.com designates 2a00:1450:4010:c03::233 as
 permitted sender) smtp.mail=p.stephani2@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (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-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:7921
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/7921>

--001a11c3675e7032e804ebda3acf
Content-Type: text/plain; charset=ISO-8859-1

2013/11/20 Dmitry Leontiev <dm.leontiev7@gmail.com>

> //resides in some popular shared library
> class A : private EventHandler {
>     A(){
>        source1.RegisterEventHandler(this);
>     }
> private:
>       void function(){printf("a");}
> };
> //imlemented by a developer who is unaware of A internals
>

I think here lies the problem: All virtual functions are part of the public
interface, independent of their visibility. That A overrides function is
not an internal of A, but part of its interface, and authors of subclasses
need to take it into account.

-- 

--- 
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 http://groups.google.com/a/isocpp.org/group/std-proposals/.

--001a11c3675e7032e804ebda3acf
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
2013/11/20 Dmitry Leontiev <span dir=3D"ltr">&lt;<a href=3D"mailto:dm.leont=
iev7@gmail.com" target=3D"_blank">dm.leontiev7@gmail.com</a>&gt;</span><br>=
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<div dir=3D"ltr"><div>//resides in some popular shared library<br></div><di=
v>class A :=A0private EventHandler {<br>  =A0=A0=A0 A(){<br>     =A0=A0=A0 =
=A0=A0 source1.RegisterEventHandler(this);<br>  =A0=A0=A0 }</div><div>priva=
te:<br>=A0=A0=A0=A0=A0 void function(){printf(&quot;a&quot;);}<br>
};</div><div>//imlemented=A0by a developer who is unaware of A internals<br=
></div></div></blockquote><div><br></div><div>I think here lies the problem=
: All virtual functions are part of the public interface, independent of th=
eir visibility. That A overrides function is not an internal of A, but part=
 of its interface, and authors of subclasses need to take it into account.=
=A0</div>
</div></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a11c3675e7032e804ebda3acf--

.
