1 // PR c++/22618
2 
3 class foo
4 {
5   typedef int memfun;  // { dg-message "private" }
6 };
7 
8 template<foo::memfun> // { dg-error "context" }
9 struct fm_obj { };
10 
11 template <typename T = foo::memfun> // { dg-error "context" }
12 struct S {};
13