Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/spaceship-ref1.C

raw
1 // Reject &&.
2 // { dg-do compile { target c++20 } }
3
4 struct A
5 {
6 bool operator==(const A&) const && = default; // { dg-error "ref-qualifier" }
7 };
8
9 struct B
10 {
11 friend bool operator==(const B&&, const B&&) = default; // { dg-error "" }
12 };