Search code examples
c++clangsuper

Using __super on Clang C++


How to use __super on Clang C++?

Here I see that __super was added to Clang http://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html

However when trying to use it on Android NDK (which uses Clang), I get compilation errors.


Solution

  • This extension is specific to Windows. It won't work on Android or anywhere else by default, since it was added so that Clang can parse the Microsoft library headers. On other platforms, you need add:

    -fms-extensions
    

    to your compilation flags to enable it.