__super

来源:互联网 发布:国家大数据项目 编辑:程序博客网 时间:2024/06/05 04:06
// deriv_super.cpp
// compile with: /c
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)
   }
};
0 0