Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/ext/typeof1.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 // Test typeof template argument substitution |
2 | |
3 // Copyright (C) 2001 Free Software Foundation | |
4 // Contributed by Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> | |
5 // { dg-do compile } | |
6 // { dg-options "" } | |
7 | |
8 template <class T> struct A { | |
9 void f() {} | |
10 void g(T* t) { | |
11 A<typeof(t)> a; | |
12 a.f(); | |
13 } | |
14 }; | |
15 | |
16 int main() | |
17 { | |
18 A<int> a; | |
19 int b; | |
20 a.g(&b); | |
21 } |