]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/g++.dg/cpp0x/sfinae13.C
Regenerate riscv.opt.urls and i386.opt.urls
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp0x / sfinae13.C
CommitLineData
ba9c349e 1// PR c++/48581
4b2e63de 2// { dg-do compile { target c++11 } }
ba9c349e
JM
3
4template<class T>
5T&& create();
6
7template<class T,
8 class = decltype(foo(create<T>()))
9>
10auto f(int) -> char;
11
12template<class>
13auto f(...) -> char (&)[2];
14
15struct S {};
16void foo(S);
17
18static_assert(sizeof(f<S>(0)) == 1, "Error"); // (#)
19
20int main() {}