]>
Commit | Line | Data |
---|---|---|
5a58e967 JM |
1 | // PR c++/90047 |
2 | // { dg-do compile { target c++11 } } | |
3 | ||
4 | template <int a> struct b { static constexpr int c = a; }; | |
5 | template <typename> struct aa; | |
6 | template <typename...> struct d; | |
7 | template <typename e, typename f, typename g, typename... h> | |
8 | struct d<e, f, g, h...> : aa<e>::i {}; | |
9 | template <typename> struct j; | |
10 | template <typename k, long l> struct j<k[l]> : b<true> {}; | |
11 | struct m { | |
12 | typedef b<0> i; | |
13 | }; | |
14 | template <typename> struct n : m::i {}; | |
15 | template <bool> struct o; | |
16 | template <typename p> struct aa { typedef p i; }; | |
17 | template <bool ab> using ac = typename o<ab>::i; // { dg-error "incomplete" } | |
18 | class q { | |
19 | template <typename k, typename> using ad = ac<d<n<k>, int, int>::c>; | |
20 | template <typename k, typename = ad<k, void>> q(k &); | |
21 | }; | |
22 | template <typename r> struct s { | |
23 | s(r) { t; } | |
24 | template <ac<!j<r>::c> *> void t(); | |
25 | }; | |
26 | class I { | |
27 | friend char operator<<(char p1, I p2) { return p1 << p2; } | |
28 | q ag; | |
29 | }; | |
30 | int main() { s<char[10]> a = (char *)""; } |