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

📄 template1.c

📁 linux下编程用 编译软件
💻 C
字号:
/* PR c++/3009 *//* { dg-do run } */// According to 14.6.2.4 of C++ Standard:// "If a base class is a dependent type, a member of that// class cannot hide a name declared within a template, or a// name from the template's enclosing scopes." class B {public:  int foo() { return 1; }}; int foo() { return 0; } template <class T> class C : public T {public:  int caller() { return foo(); } // This must be ::foo, not B::foo.};int main() {  C<B> c;  return c.caller(); // Returns 1 if we got the wrong one.}

⌨️ 快捷键说明

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