]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/cpp0x/sfinae13.C
Fix PR c++/109958: ICE taking the address of bound static member function brought...
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp0x / sfinae13.C
1 // PR c++/48581
2 // { dg-do compile { target c++11 } }
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() {}