aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/ptr-comp2.C
blob: da5b09af8adc045f2548e8fa5c4599c3b7f7cc86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// DR 1512
// PR c++/87699
// { dg-do compile { target c++11 } }

template<class T, decltype((((T*) 0) < nullptr), true) = false> // { dg-error "ordered comparison" }
bool test(T*)
{
  return true;
}

int main()
{
  test((int*)(nullptr)); // { dg-error "no matching function" }
}