使用声明似乎并没有与枚举类型 class Sample{
public:
enum Colour { RED,BLUE,GREEN};
}
using Sample::Colour;
不起作用工作! 我们是否需要为枚举类型的每个枚举器添加使用声明?像下面那样 using sample::Colour::RED;
struct B1{
int d;
void fb(){};
};
struct B2 : B1{
using B1::d;
using B1::fb;
int d; // why this gives error?
void fb(){} // and this does not?
};
int main(){}