gcc/testsuite/g++.dg/cpp0x/pr69481.C
raw| 1 | // PR c++/69481 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | // ICE with canonical type verification |
| 5 | |
| 6 | template <typename> struct Traits; |
| 7 | |
| 8 | template <typename T> |
| 9 | struct Bob { |
| 10 | using Loc = Traits<T>; |
| 11 | using typename Loc::Thing; |
| 12 | |
| 13 | Thing Foo (); |
| 14 | }; |
| 15 | |
| 16 | template <class V> struct tt |
| 17 | { |
| 18 | using ut = tt<V>; |
| 19 | ut Bob (); |
| 20 | }; |
| 21 | |
| 22 | template <class V> |
| 23 | tt<V> tt<V>::Bob () |
| 24 | { |
| 25 | return tt(); |
| 26 | } |