From -8812784058661491623
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,8113d2b4a1062c22
X-Google-Attributes: gidf78e5,public
From: Jens Kilian <Jens_Kilian@agilent.com>
Subject: Re: using declarations in derived class
Date: 2000/03/01
Message-ID: <sf4sasqk2h.fsf@bstde026.bbn.hp.com>#1/1
X-Deja-AN: 591394692
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
X-Disclaimer: All opinions expressed herein are of personal nature and do not reflect the opinion of third parties.
References: <1e6kpfp.8y76n5dxrieiN%firstian@nospam.bellatlantic.net>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Trace: mail2news.demon.co.uk 951847679 mail2news:15048 mail2news mail2news.demon.co.uk
Organization: Agilent Technologies Deutschland GmbH
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Bot-Bait: qux02@bar26.jota12.fritz45.to
Newsgroups: comp.std.c++

firstian@nospam.bellatlantic.net (Joe Chan) writes:
> I have a question about using declarations. In the good old days before
> using declarations, there is such a thing called access declarations
> that can be used in a derived class to adjust access to base class
> names. In ARM, the rule states that access declarations cannot be used
> to restrict access to a member that is accessible in the base class.
> Does this rule still apply to using declarations? I looked in the
> standard and couldn't find the section that discuss it. If this rule no
> longer applies, what is the rationale for it, since client code can
> always cast the derived class ptr to a base class ptr and access the
> member.

That is *exactly* the rationale for disallowing an access declaration which
restricts access to a member.  It wouldn't work.

-- 
mailto:jjk@acm.org                 phone:+49-7031-464-7698 (HP TELNET 778-7698)
  http://www.bawue.de/~jjk/          fax:+49-7031-464-7351
PGP:       06 04 1C 35 7B DC 1F 26 As the air to a bird, or the sea to a fish,
0x555DA8B5 BB A2 F0 66 77 75 E1 08 so is contempt to the contemptible. [Blake]

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




