OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* g++.old-deja/g++.pt/static11.C: Add xtensa-*-elf* to the
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
crash8.C
1
// Build don't link:
2
3
template<class T>
4
class TestClass1 {
5
public:
6
TestClass1() { }
7
};
8
9
template<class T>
10
class TestClass2 {
11
public:
12
TestClass2() { }
13
T operator()(int) { }
14
};
15
16
template<class T>
17
void doit(T x) {
18
TestClass1<T> q1;
19
q1 = TestClass1<T>();
20
TestClass2<T> q2;
21
q2 = TestClass2<T>();
22
23
TestClass1<T> p1;
24
p1 = TestClass1(); // ERROR - template used as expression
25
26
TestClass2<T> p2;
27
p2 = TestClass2(); // ERROR - template used as expression
28
}
29
30
int main() {
31
double x;
32
doit(x);
33
}
34