220 8088 <52A79CD3.50802@wanadoo.fr> article
Path: news.gmane.org!not-for-mail
From: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Proposal: Private extension methods
Date: Tue, 10 Dec 2013 23:59:31 +0100
Lines: 55
Approved: news@gmane.org
Message-ID: <52A79CD3.50802@wanadoo.fr>
References: <05028bfb-6f6f-4ee8-9a6e-7e6eaa3a877a@isocpp.org> <64d699c7-62e0-48ce-9c58-c9b7a6038832@isocpp.org> <CAOU91ONGstr-ieMJnQ0VB3aDqf2FJmRZef3U_xQYPaR=BsDXug@mail.gmail.com> <1902602.AxIk4I1HBX@tjmaciei-mobl2>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1386716370 17463 80.91.229.3 (10 Dec 2013 22:59:30 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 10 Dec 2013 22:59:30 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDH67CONY4PBBVFZT2KQKGQEQTQEH7Q@isocpp.org Tue Dec 10 23:59:36 2013
Return-path: <std-proposals+bncBDH67CONY4PBBVFZT2KQKGQEQTQEH7Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f198.google.com ([209.85.212.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDH67CONY4PBBVFZT2KQKGQEQTQEH7Q@isocpp.org>)
	id 1VqWH7-0003lz-FW
	for gclcip-std-proposals@m.gmane.org; Tue, 10 Dec 2013 23:59:33 +0100
Original-Received: by mail-wi0-f198.google.com with SMTP id hn9sf70570wib.9
        for <gclcip-std-proposals@m.gmane.org>; Tue, 10 Dec 2013 14:59:33 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to
         :subject:references:in-reply-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:content-transfer-encoding;
        bh=5K4BsOhH85BZ1eOjrgRD0spFBMTv2VZVUyVRBi4QNqo=;
        b=Mqc11n9p+kY4pE3uwJf/kputQxXsZsQEi7O1Y/WFDKmdShQVniu9Xr4FHtWBZ/wbdH
         BRP3RhpsSSLI99mqPthlIAvfzAv5jykdwUlykDACdn0s8Va1oSiAV2icmysbmremaIll
         31TVIVtrH0UO3OBcmWA1Hxyr28q2pQjyDLBh6kM4ofA+iQny8W34wCihKsg+85OmWpCF
         4Sn6Qy61hZpO/ATmJyKORB+0VFcIbl8A9uRYovQ5QsFr5st7wnl4v2EYIGHOA4YBwe/U
         TIxjgGHsBO0sGRyASCo3Kw2GiXTJKyV1WDrLAlLoemAMYABw29TQG4b7n6QGZDYPxzwL
         Dbp 
X-Gm-Message-State: ALoCoQknwcE5chNHCAVfsS34KVgAC5h6pBuEoXzlLh1haJSvTicPftDfAIM++2VS4uTPnDJh8QbU
X-Received: by 10.204.123.71 with SMTP id o7mr96939bkr.8.1386716373032;
        Tue, 10 Dec 2013 14:59:33 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.81.133 with SMTP id a5ls787143wiy.12.canary; Tue, 10 Dec
 2013 14:59:32 -0800 (PST)
X-Received: by 10.180.74.230 with SMTP id x6mr21397559wiv.29.1386716372049;
        Tue, 10 Dec 2013 14:59:32 -0800 (PST)
Original-Received: from smtp.smtpout.orange.fr (smtp09.smtpout.orange.fr. [80.12.242.131])
        by mx.google.com with ESMTP id ce1si1799759wib.20.2013.12.10.14.59.32
        for <std-proposals@isocpp.org>;
        Tue, 10 Dec 2013 14:59:32 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.131 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) client-ip=80.12.242.131;
Original-Received: from iMac-de-Vicente-Botet-Escriba.local ([92.139.34.180])
	by mwinf5d18 with ME
	id zyzX1m00C3tBVfg03yzXEJ; Tue, 10 Dec 2013 23:59:31 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.1.1
In-Reply-To: <1902602.AxIk4I1HBX@tjmaciei-mobl2>
X-Original-Sender: vicente.botet@wanadoo.fr
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 80.12.242.131 is neither permitted nor denied by best guess
 record for domain of vicente.botet@wanadoo.fr) smtp.mail=vicente.botet@wanadoo.fr
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:8088
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8088>

Le 10/12/13 23:46, Thiago Macieira a =E9crit :
> On ter=E7a-feira, 10 de dezembro de 2013 22:53:34, Klaim - Jo=EBl Lamotte=
 wrote:
>> Could you clarify what would prevent this to be allowed? If it is allowe=
d,
>> then maybe clarifying if it's not a problem?
> Looks like it would be allowed and it should not be considered a problem.=
 We
> give the guns, if people point to their feet and pull the trigger, we can=
't be
> blamed.
I disagree. The goal is not to give any gun. Just to be able to refactor=20
the implementation without showing it at the interface level.
> That can already be done if the interface designer left a loophole: a cla=
ss
> friend that isn't defined in this compilation unit.
>
> class Bar;
> class Foo
> {
>      // ...
> private:
>      int k;
>      friend Bar;
> };
>
>
> /// hack.cpp
> class Bar
> {
>      static int &get_k(Foo *d) { return d->k; }
> };
>
>
> To be honest, I don't know what the standard says about two different
> declarations of the same class in the same application but not the same
> translation unit. But the above will compile in most ABIs.
This violated the ODR.
> Not to mention #define private public
Note that the original idea is to don't show the private functions, not=20
making  all private function public.

Vicente

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

.
