virtual10.c

来自「Mac OS X 10.4.9 for x86 Source Code gcc」· C语言 代码 · 共 21 行

C
21
字号
// { dg-do assemble  }// Copyright (C) 2000 Free Software Foundation, Inc.// Contributed by Nathan Sidwell 14 Nov 2000 <nathan@codesourcery.com>// We failed to spot a static member which overrode a virtualstruct A{  virtual int foo (char);  static int foo ();  virtual int foo (int);    // { dg-error "" } this function  static int foo (float);  virtual int foo (double);};struct B : A{  static int foo (int);   // { dg-error "" } cannot override};

⌨️ 快捷键说明

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