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

📄 parms1.c

📁 gcc-you can use this code to learn something about gcc, and inquire further into linux,
💻 C
字号:
// Testcase for use of template parms as types for other template parms.template <class T, T t>class A {    T	a;public:    A(): a(t) {}    operator T () { return a; }};template <class S, S s>class B {    A<S,s> a;public:    B(A<S,s>& b): a(b) {}    operator S () { return a*20; }};intmain(){    A<int, 5> a;    B<int, 5> b(a);    if (b * a == 500)      return 0;    else      return 1;}

⌨️ 快捷键说明

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