]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/cpp0x/sfinae-nullptr1.C
Regenerate riscv.opt.urls and i386.opt.urls
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp0x / sfinae-nullptr1.C
1 // DR 1423, PR c++/52174
2 // { dg-do compile { target c++11 } }
3
4 template<class T>
5 T&& make();
6
7 template<class T>
8 void sink(T);
9
10 template<class T1, class T2,
11 class = decltype(sink<T2>(make<T1>()))
12 >
13 auto f(int) -> char(&)[1];
14
15 template<class, class>
16 auto f(...) -> char(&)[2];
17
18 static_assert(sizeof(f<decltype(nullptr), bool>(0)) != 1, "");