C++的super关键字

工作中看到别人的代码有__super::SetWindowSize()这样的代码,查询了一下备忘在这里。
Visual Studio 2005中新增了__super关键字,它代表本类的基类,因此可以像下面这样使用:
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)
	}
};
它还可以配合using语句使用,比如using __super::type_define;这样的。
原文地址:https://www.cnblogs.com/redsmith/p/5676331.html