Debian Codegraph @

gcc/testsuite/g++.dg/parse/typedef4.C

raw
1 // { dg-do compile }
2
3 // Origin: Matt Austern <[email protected]>
4
5 // PR c++/7983: ICE typedef to typename as friend.
6
7 template<class T> class smart_ptr2 {
8 T* real_ptr;
9 public:
10 typedef typename T::subT td; // { dg-message "previous declaration" }
11 friend class td; // { dg-error "typedef|not name a class" }
12 };