Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/nontype6.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 // { dg-do compile } |
2 // Origin: <v dot haisman at sh dot cvut dot cz> | |
3 // PR c++/13957: Improved error message for type in template (when non-type | |
4 // is expected). | |
5 | |
6 template <class T> | |
7 struct A | |
8 { | |
9 typedef int type; | |
10 }; | |
11 | |
12 template <class T> | |
13 void func(void) | |
14 { | |
15 (void)A<T>::type(); // { dg-error "non-type" "non-type" } | |
16 // { dg-message "if a type" "note" { target *-*-* } .-1 } | |
17 } | |
18 | |
19 template void func<float>(void); // { dg-message "required from here" } |