| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-w -O2 -fno-exceptions -std=c++11 -fpermissive" } */ |
| 3 |
|
| 4 |
namespace a { |
| 5 |
template <typename b, b c> struct d { static constexpr b e = c; }; |
| 6 |
template <typename> struct f : d<bool, __is_trivially_copyable(int)> {}; |
| 7 |
} |
| 8 |
typedef long g; |
| 9 |
template <typename> struct h { static const bool e = a::f<int>::e; }; |
| 10 |
namespace a { |
| 11 |
template <typename> struct ah; |
| 12 |
template <typename> class ai; |
| 13 |
} |
| 14 |
class i { |
| 15 |
public: |
| 16 |
operator[](long) const {} |
| 17 |
}; |
| 18 |
template <typename, int> class am : public i {}; |
| 19 |
class an; |
| 20 |
class k : public am<a::ai<an>, h<a::ai<a::ah<an>>>::e> {}; |
| 21 |
class l { |
| 22 |
public: |
| 23 |
aq(); |
| 24 |
}; |
| 25 |
class ar extern as; |
| 26 |
typedef k at; |
| 27 |
class m { |
| 28 |
virtual bool av(int, unsigned &, at &, int &, g &, bool); |
| 29 |
}; |
| 30 |
class ar { |
| 31 |
public: |
| 32 |
typedef m *aw(const &, int &, const &, const &); |
| 33 |
}; |
| 34 |
struct ax { |
| 35 |
static ay(ar::aw); |
| 36 |
}; |
| 37 |
template <class az> struct n { |
| 38 |
n(ar) { ax::ay(ba); } |
| 39 |
static m *ba(const &bb, int &bc, const &bd, const &be) { az(bb, bc, bd, be); } |
| 40 |
}; |
| 41 |
namespace { |
| 42 |
class G : m { |
| 43 |
unsigned bi(const at &, l &); |
| 44 |
bool av(int, unsigned &, at &, int &, g &, bool); |
| 45 |
|
| 46 |
public: |
| 47 |
G(const, int, const, const) {} |
| 48 |
}; |
| 49 |
} |
| 50 |
bool G::av(int, unsigned &, at &bl, int &, g &, bool) { |
| 51 |
l bo; |
| 52 |
bi(bl, bo); |
| 53 |
} |
| 54 |
o() { n<G> bp(as); } |
| 55 |
namespace { |
| 56 |
enum { bq, br }; |
| 57 |
} |
| 58 |
unsigned G::bi(const at &bl, l &bo) { |
| 59 |
unsigned bs; |
| 60 |
for (char *j;; j += 2) |
| 61 |
switch (*j) { |
| 62 |
case bq: |
| 63 |
bl[bs]; |
| 64 |
case br: |
| 65 |
bo.aq(); |
| 66 |
} |
| 67 |
} |