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
FSF GCC merge 02/23/03
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
instantiate4.C
blob
296356b713f8e95c3879c94492e22f1181dcc350
1
// Build then link:
2
3
// Special g++ Options: -frepo -Werror
4
5
// Submitted by Melissa O'Neill <oneill@cs.sfu.ca>
6
// the vtable of Foo<int> wouldn't be generated
7
8
template <typename A>
9
struct Foo {
10
virtual void foo() {}
11
};
12
13
template <typename A>
14
struct Bar {
15
void bar();
16
};
17
18
template <typename A>
19
void Bar<A>::bar() {
20
Foo<A> oof;
21
}
22
23
int main () {
24
Bar<int> rab;
25
26
rab.bar();
27
}