]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/g++.dg/cpp0x/extern_template-5.C
PR c++/92590 - wrong handling of inherited default ctor.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / extern_template-5.C
1 // PR c++/87554
2 // { dg-options "-O" }
3
4 template < class a > class b {
5 static void c(a);
6 static a &create() { c(instance); return mya; }
7
8 static a mya;
9
10 public:
11 static a d() { create(); return a(); }
12 static a &instance;
13 };
14 template < class a > a &b< a >::instance = create();
15 class e;
16 class f {
17 public:
18 void operator()(int g) { h(g); }
19 template < class a > void h(a i) { p(j, i); }
20 e *j;
21 };
22 class e : public f {
23 public:
24 e(int);
25 };
26 struct k {
27 int l;
28 };
29 template < class m, class a > void p(m, a) { b< k >::d(); }
30 extern template class b< k >;
31 int n;
32 int o;
33 void test() {
34 e out(o);
35 out(n);
36 }
This page took 0.038338 seconds and 5 git commands to generate.