145
|
1 // { dg-do compile }
|
|
2 // { dg-require-effective-target c++14 }
|
|
3
|
|
4 class a {
|
|
5 public:
|
|
6 typedef int b;
|
|
7 operator b();
|
|
8 };
|
|
9 class c {
|
|
10 public:
|
|
11 constexpr int m_fn1() const;
|
|
12 constexpr int d() const;
|
|
13 int e;
|
|
14 int f;
|
|
15 };
|
|
16 constexpr int c::m_fn1() const { return e; }
|
|
17 constexpr int c::d() const { return f; }
|
|
18 class g {
|
|
19 public:
|
|
20 g();
|
|
21 constexpr void i(const c &) noexcept;
|
|
22 int j;
|
|
23 int k;
|
|
24 int l;
|
|
25 int m;
|
|
26 };
|
|
27 constexpr void g::i(const c &n) noexcept {
|
|
28 int v = l - j, h = m - k;
|
|
29 j = n.m_fn1() - v / 2;
|
|
30 k = n.d() - h / 2;
|
|
31 l = j + v;
|
|
32 m = k + h;
|
|
33 }
|
|
34 class o {
|
|
35 void m_fn4() const;
|
|
36 a p;
|
|
37 } r;
|
|
38 void o::m_fn4() const {
|
|
39 g q;
|
|
40 c t;
|
|
41 q.i(t);
|
|
42 r.p || 0;
|
|
43 }
|