111
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "-O2 -std=c++11" } */
|
|
3
|
|
4 struct A {};
|
|
5 struct B {};
|
|
6 struct C { using p = int *; template <typename> using ra = A; };
|
|
7 struct J : C { template <typename> struct K { typedef C::ra<int> o; }; };
|
|
8 template <typename> struct D
|
|
9 {
|
|
10 struct H : J::K<int>::o { H (J::p, A) : J::K<int>::o () {} };
|
|
11 H d;
|
|
12 D (const char *, const A &x = A ()) : d (0, x) {}
|
|
13 };
|
|
14 extern template class D<char>;
|
|
15 enum L { M };
|
|
16 struct F { virtual char *foo (); };
|
131
|
17 template <class> struct I : B { static int foo (int) { return 0; } };
|
111
|
18 struct G { typedef I<int> t; };
|
|
19 void foo (int) { G::t::foo (0); }
|
|
20 void bar (const D<char> &, const D<int> &, int, L);
|
|
21 void baz () try { foo (0); } catch (F &e) { bar (e.foo (), "", 0, M); }
|