blob: 3cff1b4b9b1bc289d11510a2751d1f0faf08dda4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// PR c++/48581
// { dg-do compile { target c++11 } }
template<class T>
T&& create();
template<class T,
class = decltype(foo(create<T>()))
>
auto f(int) -> char;
template<class>
auto f(...) -> char (&)[2];
struct S {};
void foo(S);
static_assert(sizeof(f<S>(0)) == 1, "Error"); // (#)
int main() {}
|