Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/template-id-2.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-do compile } |
2 | |
3 // Origin: Richard Guenther <rguenth@tat.physik.uni-tuebingen.de> | |
4 | |
5 // PR c++/12924 | |
6 | |
7 template<typename> struct A {}; | |
8 | |
9 template<> struct A<void> | |
10 { | |
11 template<typename T> void foo() | |
12 { | |
13 A<T> a; | |
14 a.template foo<int>(); // { dg-error "member" } | |
15 } | |
16 }; | |
17 | |
18 void bar() | |
19 { | |
20 A<void> a; | |
21 a.foo<int>(); // { dg-message "required" } | |
22 } |