OONumerics User : |
From: Paul C. Leopardi (leopardi_at_[hidden])
Date: 2006-01-17 16:30:58
Nguyen Xuan Son,
What happens when you remove the friend declaration from MYDERIVEDCLASS and
change the relevant private parts of MYBASECLASS to protected?
This should allow the derived class to see into the protected parts of the
base class without making these parts public.
See eg.
http://www.parashift.com/c++-faq-lite/basics-of-inheritance.html#faq-19.5
http://www.mactech.com/articles/mactech/Vol.10/10.09/DerivedClasses/
Best regards, Paul Leopardi
On Tuesday January 17 2006 10:18, Nguyen Xuan Son wrote:
...
> class MYDERIVEDCLASS:public MYBASECLASS<MYDERIVEDCLASS>
> {
> friend class MYBASECLASS;
> ....
> }
>
> Where I have define the base class as:
>
> template<typename ADerivedSolver> class MYBASECLASS
> {
> ...
> }