1// PR c++/50324 2// { dg-do compile { target c++11 } } 3 4struct complete { }; 5struct incomplete; 6 7template<class T> auto f(T *) -> decltype(T{}) *; 8template<class T> char f(T); 9 10int main() 11{ 12 complete *p = 0; 13 static_assert(sizeof(f(p)) == sizeof(void*), ""); 14 incomplete *q = 0; 15 static_assert(sizeof(f(q)) == 1u, ""); 16} 17