blob: 7f3012f94df140c8450448813c1e9da87e8bae3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// PR c++/48449
// { dg-options -std=c++0x }
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");
|