From 6866301331221743864
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,571e59f23dcffa13
X-Google-Attributes: gidf78e5,public
From: Steve Clamage <stephen.clamage_nospam@Eng.Sun.COM>
Subject: Re: making selected members public with using?
Date: 1997/09/11
Message-ID: <34173E52.3F7C@Eng.Sun.COM>#1/1
X-Deja-AN: 271679729
References: <3416887F.4B8F79DB@physik.tu-muenchen.de>
X-Original-Date: Wed, 10 Sep 1997 17:41:54 -0700
Organization: Sun Microsystems, Inc.
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBNBhNqky4NqrwXLNJAQH/CQH+KGjrEkXD8g7YQm7IuVFmVR1y0m1uhJVo qkFTb1SUY6qAEj/I64+1uOUJMBuvKgSROgm2EItA/PyMQKDpFQvj/A== =hPys
Newsgroups: comp.std.c++
Originator: austern@isolde.mti.sgi.com



Christopher Eltschka wrote:
> 
> Is it possible to make just a few member function from a private
> base class public with the following code?
> 
> class Base
> {
> public:
>   void f();
>   void g();
> };
> 
> class Derived: private Base
> {
> public:
>   using Base::f; // make B::f public?
> };

Yes. The old way to perform this operation was an "access declaration":
	class Derived : private Base {
	public:
		Base::f;
	};
but using-declarations are now preferred. They have nicer overall
semantics and are more flexible.

-- 
Steve Clamage, stephen.clamage_nospam@eng.sun.com
( Note: remove "_nospam" when replying )
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]



