220 1505 <ff102f2b-949c-4804-b5e3-30652895cc21@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Arthur Tchaikovsky <atch.cpp@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: making using declaration more precise
Date: Tue, 8 Jan 2013 00:54:25 -0800 (PST)
Lines: 108
Approved: news@gmane.org
Message-ID: <ff102f2b-949c-4804-b5e3-30652895cc21@isocpp.org>
References: <738f626c-3b23-4c74-9eea-2c2246921a81@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_791_17842400.1357635265371"
X-Trace: ger.gmane.org 1357635265 22387 80.91.229.3 (8 Jan 2013 08:54:25 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 8 Jan 2013 08:54:25 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDL6FI4NYYERBQV5V6DQKGQE5PBAMBY@isocpp.org Tue Jan 08 09:54:42 2013
Return-path: <std-proposals+bncBDL6FI4NYYERBQV5V6DQKGQE5PBAMBY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ye0-f197.google.com ([209.85.213.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDL6FI4NYYERBQV5V6DQKGQE5PBAMBY@isocpp.org>)
	id 1TsUxG-0000Bp-AV
	for gclcip-std-proposals@m.gmane.org; Tue, 08 Jan 2013 09:54:42 +0100
Original-Received: by mail-ye0-f197.google.com with SMTP id q9sf318171yen.4
        for <gclcip-std-proposals@m.gmane.org>; Tue, 08 Jan 2013 00:54:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:date:from:to:message-id
         :in-reply-to:references:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-google-group-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=WdmQGAFxS+BXxQO0R2AZ5ZKAIp9v/FWI+wXa6l0laCA=;
        b=EpHYhuiUCmoBD5n1DJJ8jqgzksTCBAw8m9Ms7Fj1dRAbxR5ltRkS2zttZXbwojTS6l
         MjGVIJJ7Mxl43W5LSUAny+Svtrj5JmiK76u0H8AyRf7n+xrBujehoz/pLvIH4z1BLVvD
         tEKmZEt1nXCiYaveViy8845d7vk0UirL6xnLEuILfiKLzKtGUyf6QbpKdqZH6LRpPiLG
         KeoiMO5MRFLMicb/5cZDkRnhornMYvy32e3Yj7+g6QfONXmNFjX/KWuKZfQnPRF8YyVJ
         363iyRny8liR7ss20NjJBSc0m7OM1l/dWhrpmyoJRI+j2B41ejV9J7t3GE0quYLViUz2
         k5Hg==
X-Received: by 10.224.178.204 with SMTP id bn12mr7199783qab.1.1357635266193;
        Tue, 08 Jan 2013 00:54:26 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.116.139 with SMTP id jw11ls171938qeb.37.gmail; Tue, 08 Jan
 2013 00:54:25 -0800 (PST)
X-Received: by 10.49.15.100 with SMTP id w4mr11089809qec.26.1357635265773;
        Tue, 08 Jan 2013 00:54:25 -0800 (PST)
In-Reply-To: <738f626c-3b23-4c74-9eea-2c2246921a81@isocpp.org>
X-Original-Sender: atch.cpp@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?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:1505
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/1505>

------=_Part_791_17842400.1357635265371
Content-Type: text/plain; charset=ISO-8859-1

>Thinking like this is what makes me want the C++ committee to establish 
some 
>kind of "small feature" group.

I believe that this would work really great and C++ could only benefit from 
it.

On Saturday, 5 January 2013 18:07:03 UTC, Arthur Tchaikovsky wrote:
>
> I wonder if anyone feels the same as me about using declaration while 
> specifying members from base class? As things are now, it is very blunt and 
> not very precise tool, which could be quite easily tweaked.
> What I mean is:
>
> class A
> {
> public:
> void f();
> void f(int);
> };
>
> class B: public A
> {
> using A::f;//here we cannot make a choice on which one we would like to 
> use in our B class, which sometimes is ok...
> };
>
> but in scenario:
> class A
> {
> void f(int);
> public:
> void f();
> };
>
> class B :public A
> {
> using A::f;//will not compile even though the only fnc we want is A::f()
> };
>
> What I would like to propose is following backwards compatible syntax:
>
> class B :public A
> {
> using A::f;//here I'm specifying that I want use every fnc 'f' from A - 
> just like before, but this will not compile
> using A::f();//here I explicitly specify which fnc I want to use
> };
>
> The use case which is I believe compelling is the one that if function f 
> overloaded and one or more is declared  private, this actively prohibits us 
> from the use of any other, non-private functions 'f' from the base class.
>
> Looking forward to comments.
>
>

-- 




------=_Part_791_17842400.1357635265371
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<span style=3D"color: rgb(80, 0, 80);">&gt;Thinking like this is what makes=
 me want the C++ committee to establish some&nbsp;</span><br style=3D"color=
: rgb(80, 0, 80);"><span style=3D"color: rgb(80, 0, 80);">&gt;kind of "smal=
l feature" group.</span><div><br></div><div><font color=3D"#500050">I belie=
ve that this would work really great and C++ could only benefit from it.</f=
ont></div><div><br>On Saturday, 5 January 2013 18:07:03 UTC, Arthur Tchaiko=
vsky  wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">I wonder if anyone=
 feels the same as me about using declaration while specifying members from=
 base class? As things are now, it is very blunt and not very precise tool,=
 which could be quite easily tweaked.<div>What I mean is:</div><div><br></d=
iv><div>class A</div><div>{</div><div>public:</div><div>void f();</div><div=
>void f(int);</div><div>};<br></div><div><br></div><div>class B: public A</=
div><div>{</div><div>using A::f;//here we cannot make a choice on which one=
 we would like to use in our B class, which sometimes is ok...</div><div>};=
</div><div><br></div><div>but in scenario:</div><div>class A</div><div>{</d=
iv><div>void f(int);</div><div>public:</div><div>void f();</div><div>};</di=
v><div><br></div><div>class B :public A</div><div>{</div><div>using A::f;//=
will not compile even though the only fnc we want is A::f()</div><div>};</d=
iv><div><br></div><div>What I would like to propose is following backwards =
compatible syntax:</div><div><br></div><div><div>class B :public A</div><di=
v>{</div><div>using A::f;//here I'm specifying that I want use every fnc 'f=
' from A - just like before, but this will not compile</div><div>using A::f=
();//here I explicitly specify which fnc I want to use</div><div>};</div></=
div><div><br></div><div>The use case which is I believe&nbsp;compelling is =
the one that if function f overloaded and one or more is declared&nbsp;&nbs=
p;private, this actively prohibits us from the use of any other, non-privat=
e functions 'f' from the base class.</div><div><br></div><div>Looking forwa=
rd to comments.</div><div><br></div></blockquote></div>

<p></p>

-- <br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_791_17842400.1357635265371--

.
