summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/sfinae-nullptr1.C
blob: 7f3c5c4eb3d1e2572c472595a8114efe45f01978 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// DR 1423, PR c++/52174
// { dg-do compile { target c++11 } }

template<class T>
T&& make();

template<class T>
void sink(T);

template<class T1, class T2,
  class = decltype(sink<T2>(make<T1>()))
>
auto f(int) -> char(&)[1];

template<class, class>
auto f(...) -> char(&)[2];

static_assert(sizeof(f<decltype(nullptr), bool>(0)) != 1, "");