Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/nsdmi-template18.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++/86099 | |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 template <int a> struct e { static constexpr int c = a; }; | |
5 template <bool a> using d = e<a>; | |
6 template <bool, typename> struct aa; | |
7 template <typename...> struct j; | |
8 template <typename f, typename g> struct j<f, g> : aa<f::c, g>::h {}; | |
9 template <typename i> struct n : d<i::c> {}; | |
10 template <typename k, typename l = k> l m(int); | |
11 template <typename k> auto ab() -> decltype(m<k>(0)); | |
12 template <typename...> struct p; | |
13 template <typename k, typename o> struct p<k, o> : e<noexcept(k(ab<o>()))> {}; | |
14 template <typename> struct r; | |
15 class s; | |
16 template <typename, typename... q> | |
17 struct ac : j<d<true>, p<r<s>, q...>> {}; | |
18 template <typename k> struct ae : ac<k, k> {}; | |
19 template <bool, typename ad> struct aa { typedef ad h; }; | |
20 template <typename k> struct w : j<n<ae<k>>, d<true>> {}; | |
21 template <typename t> struct r { | |
22 t f; | |
23 int af; | |
24 r(r &&) = default; | |
25 }; | |
26 template <typename k, typename = typename aa<w<k>::c, k>::h> void v(k *); | |
27 template <typename ag, typename ah, typename ai> ah aj(ag x, ah, ai) { v(x); return 0; } | |
28 template <typename> struct y { typedef int ak; }; | |
29 template <typename, typename = int> class z { | |
30 public: | |
31 template <typename...> void al(); | |
32 }; | |
33 template <typename k, typename am> template <typename...> void z<k, am>::al() { | |
34 r<s> *u; | |
35 typename y<am>::ak a = aj(u, a, int()); | |
36 } | |
37 class s { | |
38 char *an = nullptr; | |
39 }; | |
40 void ao() { | |
41 z<int> b; | |
42 b.al(); | |
43 } |