nontype6.c

来自「xml大全 可读写调用率很高 xml大全 可读写调用率很高」· C语言 代码 · 共 20 行

C
20
字号
// { dg-do compile }// Origin: <v dot haisman at sh dot cvut dot cz>// PR c++/13957: Improved error message for type in template (when non-type//  is expected).template <class T>struct A{  typedef int type;};template <class T>void func(void){  (void)A<T>::type();	 // { dg-error "if a type is meant" }// { dg-error "parsed as a non-type" "" { target *-*-* } 15 }}template void func<float>(void);    // { dg-error "instantiated from here" }

⌨️ 快捷键说明

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