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