Talk About Network

Google





Programming > C - C++ Learning > Re: templates a...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 4131 of 4400
Post > Topic >>

Re: templates and inheritance

by Bart van Ingen Schenau <bart@[EMAIL PROTECTED] > Apr 30, 2008 at 10:16 PM

ruebezaehler wrote:

> Hello,
> 
> I have two cl*****, C_A and template<typename T>C_B which are derived
> "private" from the base cl***** C_A_ resp. template<typename T>C_B_.
> 
> The behaviour is quite different. The users of C_B can access the
> variable var of C_B_, but not the users of C_A. Moreover, in C_A the
> visibility of var is also controlable via the construct "private: /
> public: using C_A_::var;", but this is not the case for C_B.
> 
> Can sb. explain the different behaviour.

The difference in behaviour looks very much like a bug in your compiler.
Template cl***** and non-template cl***** use the exact same access
rules, so the behaviour should be the same.

The behaviour for class C_A is as it should be.

Bart v Ingen Schenau
-- 
a.c.l.l.c-c++ FAQ: http://www.comeaucomputing.com/learn/faq
c.l.c FAQ: http://c-faq.com/
c.l.c++ FAQ: http://www.para****ft.com/c++-faq-lite/
 




 4 Posts in Topic:
templates and inheritance
ruebezaehler <ruebezae  2008-04-30 17:36:25 
Re: templates and inheritance
"sk_usenet" <  2008-04-30 10:01:43 
Re: templates and inheritance
Bart van Ingen Schenau &l  2008-04-30 22:16:49 
Re: templates and inheritance
ruebezaehler <ruebezae  2008-05-01 08:54:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Fri Jan 9 5:46:58 PST 2009.