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

📄 friend44.c

📁 linux下编程用 编译软件
💻 C
字号:
// { dg-do compile }// Test that template friends referring to class template members are// respected.template <class T> struct A{  int f (T);  struct AI {    int f (T);  };};class B{  template <class T> friend int A<T>::f (T);  template <class T> friend struct A<T>::AI;  int a;public:  B(): a(0) { }};template <class T> int A<T>::f (T){  B b;  return b.a;}template <class T> int A<T>::AI::f (T){  B b;  return b.a;}int main (){  A<int> a;  A<int>::AI ai;  int r = a.f (0);  r |= ai.f (0);  return r;}

⌨️ 快捷键说明

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