summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/spaceship-err2.C
blob: 6461c6ab60a782e7155e4e704fffe8026c049614 (plain)
1
2
3
4
5
6
7
// { dg-do compile { target c++2a } }

#include <compare>
template <class T, T x = (T() <=> T())> // { dg-error "31:0 <=> 0" }
void f(T);
//constexpr int f(...) { return 42; }
constexpr int i = f(24);	//  { dg-error "no match" }