Using "super" for base class in C++/CLI

  • Thread starter Thread starter Edward Diener
  • Start date Start date
E

Edward Diener

In Managed C++ one could use __super to invoke a base class function.
Has this been changed to "super" or is it still "__super" ? Looking
through the MSDN help I could not find a hit for just "super".
 
__super is one of the few double underscore keywords left in C++/CLI.
(__identifier is another).
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter & VB to C++ converter
Instant J#: VB to J# converter
 
David said:
__super is one of the few double underscore keywords left in C++/CLI.
(__identifier is another).

Thanks, I should have suspected that when I could not find "super" for
VC++ in the VS2005 docs. I do remember that __identifier is there but I
thought it was the only double underscore keyword left. Now I know
different.
 
Edward Diener said:
Thanks, I should have suspected that when I could not find "super" for
VC++ in the VS2005 docs. I do remember that __identifier is there but I
thought it was the only double underscore keyword left. Now I know
different.

Well, I'd argue __super is not specifically related to C++/CLI.

After all, there's still __stdcall, __declspec, __pragma etc.

In fact, some argue __super is especially useful with multiple
inheritance where the appropriate base class is selected based
on context.
Typically, however, you wouldn't use __super to refer to
an interface.

Anyway, I fail to see any case where you couldn't use
the (injected) base class name instead of using __super.

-hg
 
Back
Top