repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Dead
[official-gcc.git]
/
gomp-20050608-branch
/
gcc
/
testsuite
/
g++.dg
/
ext
/
typeof1.C
blob
a3c13c8ae13858adb6a8c8d807d899e2f51fd593
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
}