Topic: inherited...
Author: pslau@gold.interlog.com (Peter S Lau)
Date: 1997/04/02 Raw View
Is this a std keyword, common extension, or vendor dependent
feature?
Thanks.
pete
---
[ 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
]
Author: Oleg Zabluda <zabluda@math.psu.edu>
Date: 1997/04/02 Raw View
Peter S Lau <pslau@gold.interlog.com> wrote:
: Is this a std keyword, common extension, or vendor dependent
: feature?
No. This was one of the proposals, the committee did not adopt.
The idea was:
class Base { public: void g(){} };
class Derived : public Base {
public:
void f() { inherited::g(); }
};
It was not adopted because this does not work for multiple inheritance
and more or less the same thing can be done within existing C++.
class Derived : public Base {
typedef Base inherited;
public:
void f() { inherited::g(); }
};
Oleg.
--
Life is a sexually transmitted, 100% lethal disease.
---
[ 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 ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Author: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson)
Date: 1997/04/03 Raw View
Oleg Zabluda <zabluda@math.psu.edu> writes:
>Peter S Lau <pslau@gold.interlog.com> wrote:
>: Is this a std keyword, common extension, or vendor dependent
>: feature?
>
>No. This was one of the proposals, the committee did not adopt.
...
>It was not adopted because this does not work for multiple inheritance
>and more or less the same thing can be done within existing C++.
Actually you may be right, it may have been rejected as a result
of misconceptions like this.
The fact of the matter is in fact quite the opposite:
an `inherited' keyword _would_ work for multiple inheritance,
and you can't easily do the same thing in existing C++, because
the typedef workaround doesn't work for multiple inheritance.
Now being an optimist I personally would like to believe that the
committee did understand the points made above, and rejected the
proposal not because of such misconceptions but simply because they
judged the benefits to be not worth the increase in language complexity.
I have no particular desire to rehash these arguments again; those who
are interested should use dejanews to look up previous discussions on
this topic in this newsgroup.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.
---
[ 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 ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]