OSDN Git Service

2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / instantiate4.C
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 }