blob: 72dbce080ced6ef8f0d519569e4e119efb8fa7dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// PR c++/48452
// { dg-options -std=c++0x }
namespace std {
template <class T> T&& declval();
}
template<class T, class... Args>
decltype(T(std::declval<Args>()...), char()) f(int);
template<class, class...>
char (&f(...))[2];
struct B {};
static_assert(sizeof(f<B, void, int>(0)) != 1, "Error"); // b
static_assert(sizeof(f<void, int, int>(0)) != 1, "Error"); // c
|