⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 friend4.c

📁 gcc-you can use this code to learn something about gcc, and inquire further into linux,
💻 C
字号:
// { dg-do compile }// Copyright (C) 2002 Free Software Foundation, Inc.// Contributed by Nathan Sidwell 18 Dec 2001 <nathan@codesourcery.com>// PR 109, dependent member friendsstruct B{  static int foo ();  struct N  {    static int bar ();  };};template <class T>class A{  friend int T::foo ();  friend int T::N::bar ();    private:  static int m;};template <class T>class C{  friend struct T::N;  private:  static int m;};int B::foo (){  return A<B>::m;}int B::N::bar (){  return A<B>::m + C<B>::m;}

⌨️ 快捷键说明

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