blob: 43381d05d808f2de78ff8a65aa3e6681eafb0fe7 [file] [log] [blame]
// PR c++/48449
// { dg-do compile { target c++11 } }
template<class T, class = decltype(T())>
char f(int);
template<class>
char (&f(...))[2];
struct A { virtual ~A() = 0; };
static_assert(sizeof(f<int&>(0)) != 1, "Error");
static_assert(sizeof(f<void()>(0)) != 1, "Error");
static_assert(sizeof(f<A>(0)) != 1, "Error");