blob: 1eeba64bc1dc326314cd27fb94d4940a4556ed64 [file] [log] [blame]
// PR c++/50324
// { dg-do compile { target c++11 } }
struct complete { };
struct incomplete;
template<class T> auto f(T *) -> decltype(T{}) *;
template<class T> char f(T);
int main()
{
complete *p = 0;
static_assert(sizeof(f(p)) == sizeof(void*), "");
incomplete *q = 0;
static_assert(sizeof(f(q)) == 1u, "");
}