1 // PR c++/53651
2 // { dg-do compile { target c++11 } }
3 
4 template<typename> struct wrap { void bar(); };
5 
6 template<typename T> auto foo(T* t) -> wrap<T>* { return 0; }
7 
8 template<typename T>
9 struct holder : decltype(*foo((T*)0)) // { dg-error "class type" }
10 {
11     using decltype(*foo((T*)0))::bar; // { dg-error "is not a class" }
12 };
13 
14 holder<int> h;
15