Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg2.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
// PR c++/92774 // { dg-do compile { target c++2a } } #include <compare> template<typename T> struct X { }; template<typename T> bool operator==(const X<T>&, const X<T>&) { return true; } template<typename T> bool operator<(const X<T>&, const X<T>&) { return true; } struct Y { int a; X<int> c; auto operator <=>(Y const&) const = default; // { dg-error "no match" } }; void f() { auto x = Y() < Y(); // { dg-error "deleted" } }