scoped1.c

来自「linux下的gcc编译器」· C语言 代码 · 共 23 行

C
23
字号
// Test that explicitly scoped references to static members work even if// they belong to an inaccessible base.struct A{  static int i1;  int i2;  static void f1 ();  void f2 ();};struct B: private A { };struct C: public B{  void g ()  {    ::A::i1 = 1;    ::A::i2 = 1;		// { dg-error "access" "" }    ::A::f1 ();    ::A::f2 ();			// { dg-error "" }  }};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?