ttp12.c

来自「linux下编程用 编译软件」· C语言 代码 · 共 20 行

C
20
字号
// Copyright (C) 2004 Free Software Foundation// Contributed by Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>// { dg-do compile }// Check the type of non-type parameter in template template parameter// only if it is dependent.template <template <int* p> class T>struct X {};template <typename U, template <U* p> class T>struct Y {    X<T> x;};template <int* p> struct Z {};Y<int, Z> y1;Y<char, Z> y2;		// { dg-error "mismatch|expected|invalid" }

⌨️ 快捷键说明

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