
-
static成员函数没有this指针
1
2
3
4
5
6#include<iostream>
class Test {
static Test * () {
return this;
}
}; -
不可以是虚函数
-
拥有相同名称和参数类型列表的两个成员函数不能被重载,如果其中一个是static成员函数
1
2
3
4
5#include<iostream>
class Test {
static void () {}
void () {}
}; -
不可以被声明为const,volatile,const volatile
1
2
3
4
5
6#include<iostream>
class Test {
static void () const {
return;
}
};




近期评论