| 1 |
// PR c++/50800 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
template <typename> struct A; |
| 5 |
template <typename _Up> struct A<_Up *> { typedef _Up type; }; |
| 6 |
template <typename T> struct B { typedef typename A<T>::type type; }; |
| 7 |
template <typename> struct C; |
| 8 |
template <typename From> struct C<const From> { |
| 9 |
typedef typename B<From>::type SimpleType; |
| 10 |
}; |
| 11 |
template <class> struct D { typedef int ret_type; }; |
| 12 |
template <class From> struct F { |
| 13 |
typedef typename D<typename C<From>::SimpleType>::ret_type ret_type; |
| 14 |
}; |
| 15 |
template <class, class Y> typename F<Y>::ret_type cast(Y &); |
| 16 |
class CompoundStmt; |
| 17 |
class alignas(8) Stmt { |
| 18 |
Stmt *Children[1]; |
| 19 |
CompoundStmt *getBlock() const { cast<CompoundStmt>(Children[0]); return 0; } |
| 20 |
}; |