Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/lto/pr83720_0.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 // PR c++/83720 | |
2 // { dg-lto-do assemble } | |
3 | |
4 #pragma GCC diagnostic ignored "-Wreturn-type" | |
5 | |
6 namespace b { | |
7 class h { | |
8 public: | |
9 template <typename ae, typename af> h(ae af::*...) { | |
10 [] {}; | |
11 } | |
12 }; | |
13 class ai {}; | |
14 template <typename> class c { | |
15 public: | |
16 template <typename ag> void aj(const char *, ag f) { h(f, int()); } | |
17 }; | |
18 } | |
19 template <typename> class al; | |
20 template <typename e> class i { | |
21 protected: | |
22 static e g(const int) { } | |
23 }; | |
24 template <typename, typename> class j; | |
25 template <typename an, typename e, typename... ao> | |
26 class j<an(ao...), e> : i<e> { | |
27 typedef i<e> ap; | |
28 | |
29 public: | |
30 static an aq(const int &ar, ao... as) { ap::g(ar)(as...); } | |
31 }; | |
32 template <typename an, typename... ao> class al<an(ao...)> { | |
33 template <typename, typename a> using ax = a; | |
34 | |
35 public: | |
36 template <typename e, typename = ax<int, void>, typename = ax<int, void>> | |
37 al(e); | |
38 using ay = an (*)(const int &, ao...); | |
39 ay az; | |
40 }; | |
41 template <typename an, typename... ao> | |
42 template <typename e, typename, typename> | |
43 al<an(ao...)>::al(e) { | |
44 az = j<an(ao...), e>::aq; | |
45 } | |
46 class k { | |
47 public: | |
48 k(al<void(b::ai)>); | |
49 } d([](b::ai) { | |
50 struct be { | |
51 virtual void f(); | |
52 }; | |
53 struct bf; | |
54 b::c<bf>().aj("", &be::f); | |
55 }); |