This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Microsoft Specific C++ keyword "__super"
- From: "Richard E Collins" <richard at collins1969 dot fsnet dot co dot uk>
- To: <gcc at gcc dot gnu dot org>
- Date: Wed, 25 Aug 2004 13:01:33 +0100
- Subject: Microsoft Specific C++ keyword "__super"
- Reply-to: "Richard E Collins" <richard at collins1969 dot fsnet dot co dot uk>
Is this supported in GCC, if so does it have a different name? Its very
handy.
The "__super" keyword allows you to call the parent(super) class without
needing to know what it is called, here is an example i've copied from the
MS docs.
struct B1
{
void mf(int)
{
// ...
}
};
struct B2
{
void mf(short)
{
// ...
}
void mf(char)
{
// ...
}
};
struct D : B1, B2
{
void mf(short)
{
__super::mf(1); // Calls B1::mf(int)
__super::mf('s'); // Calls B2::mf(char)
}
};
int main()
{
}
Richard e Collins
www.maddoggames.com