[gcn] install.texi: Update for new ISA targets and their requirements
[gcc.git] / gcc / testsuite / g++.dg / cpp23 / explicit-obj-redecl4.C
blob2e1b12b874f715a370f6bff822d198ccef41fb4f
1 // P0847R7
2 // { dg-do compile { target c++23 } }
4 // redeclarations with equivalent constraints
6 template<typename T>
7 concept Constrain = true;
10 struct S {
11 // xobj/static
12   void f_xs_v(this S, Constrain auto) {}; // { dg-note {previous declaration} }
13   static void f_xs_v(Constrain auto) {}; // { dg-error {cannot be overloaded with} }
15   void f_xs_ref(this S&, Constrain auto) {}; // { dg-note {previous declaration} }
16   static void f_xs_ref(Constrain auto) {}; // { dg-error {cannot be overloaded with} }
18   void f_xs_cref(this S const&, Constrain auto) {}; // { dg-note {previous declaration} }
19   static void f_xs_cref(Constrain auto) {}; // { dg-error {cannot be overloaded with} }
21   void f_xs_rref(this S&&, Constrain auto) {}; // { dg-note {previous declaration} }
22   static void f_xs_rref(Constrain auto) {}; // { dg-error {cannot be overloaded with} }
24   void f_xs_crref(this S const&&, Constrain auto) {}; // { dg-note {previous declaration} }
25   static void f_xs_crref(Constrain auto) {}; // { dg-error {cannot be overloaded with} }
27 // static/xobj
28   static void f_sx_v(Constrain auto) {}; // { dg-note {previous declaration} }
29   void f_sx_v(this S, Constrain auto) {}; // { dg-error {cannot be overloaded with} }
31   static void f_sx_ref(Constrain auto) {}; // { dg-note {previous declaration} }
32   void f_sx_ref(this S&, Constrain auto) {}; // { dg-error {cannot be overloaded with} }
34   static void f_sx_cref(Constrain auto) {}; // { dg-note {previous declaration} }
35   void f_sx_cref(this S const&, Constrain auto) {}; // { dg-error {cannot be overloaded with} }
37   static void f_sx_rref(Constrain auto) {}; // { dg-note {previous declaration} }
38   void f_sx_rref(this S&&, Constrain auto) {}; // { dg-error {cannot be overloaded with} }
40   static void f_sx_crref(Constrain auto) {}; // { dg-note {previous declaration} }
41   void f_sx_crref(this S const&&, Constrain auto) {}; // { dg-error {cannot be overloaded with} }
43   // iobj/xobj
44   void f_ix_lref(Constrain auto) {}; // { dg-note {previous declaration} }
45   void f_ix_lref(this S&, Constrain auto) {}; // { dg-error {cannot be overloaded with} }
47   void f_ix_rref(Constrain auto) {}; // { dg-note {previous declaration} }
48   void f_ix_rref(this S&&, Constrain auto) {}; // { dg-error {cannot be overloaded with} }
50   void f_ix_const_lref(Constrain auto) const {}; // { dg-note {previous declaration} }
51   void f_ix_const_lref(this S const&, Constrain auto) {}; // { dg-error {cannot be overloaded with} }
53   void f_ix_const_rref(Constrain auto) const {}; // { dg-note {previous declaration} }
54   void f_ix_const_rref(this S const&&, Constrain auto) {}; // { dg-error {cannot be overloaded with} }
55   
56   // xobj/iobj
57   void f_xi_lref(this S&, Constrain auto) {}; // { dg-note {previous declaration} }
58   void f_xi_lref(Constrain auto) {}; // { dg-error {cannot be overloaded with} }
60   void f_xi_rref(this S&&, Constrain auto) {}; // { dg-note {previous declaration} }
61   void f_xi_rref(Constrain auto) {}; // { dg-error {cannot be overloaded with} }
63   void f_xi_const_lref(this S const&, Constrain auto) {}; // { dg-note {previous declaration} }
64   void f_xi_const_lref(Constrain auto) const {}; // { dg-error {cannot be overloaded with} }
66   void f_xi_const_rref(this S const&&, Constrain auto) {}; // { dg-note {previous declaration} }
67   void f_xi_const_rref(Constrain auto) const {}; // { dg-error {cannot be overloaded with} }
69   // with ref qualifier
71   // iobj/xobj
72   void f_ix_lref_refqual(Constrain auto) & {}; // { dg-note {previous declaration} }
73   void f_ix_lref_refqual(this S&, Constrain auto) {}; // { dg-error {cannot be overloaded with} }
75   void f_ix_rref_refqual(Constrain auto) && {}; // { dg-note {previous declaration} }
76   void f_ix_rref_refqual(this S&&, Constrain auto) {}; // { dg-error {cannot be overloaded with} }
78   void f_ix_const_lref_refqual(Constrain auto) const& {}; // { dg-note {previous declaration} }
79   void f_ix_const_lref_refqual(this S const&, Constrain auto) {}; // { dg-error {cannot be overloaded with} }
81   void f_ix_const_rref_refqual(Constrain auto) const&& {}; // { dg-note {previous declaration} }
82   void f_ix_const_rref_refqual(this S const&&, Constrain auto) {}; // { dg-error {cannot be overloaded with} }
83   
84   // xobj/iobj
85   void f_xi_lref_refqual(this S&, Constrain auto) {}; // { dg-note {previous declaration} }
86   void f_xi_lref_refqual(Constrain auto) & {}; // { dg-error {cannot be overloaded with} }
88   void f_xi_rref_refqual(this S&&, Constrain auto) {}; // { dg-note {previous declaration} }
89   void f_xi_rref_refqual(Constrain auto) && {}; // { dg-error {cannot be overloaded with} }
91   void f_xi_const_lref_refqual(this S const&, Constrain auto) {}; // { dg-note {previous declaration} }
92   void f_xi_const_lref_refqual(Constrain auto) const& {}; // { dg-error {cannot be overloaded with} }
94   void f_xi_const_rref_refqual(this S const&&, Constrain auto) {}; // { dg-note {previous declaration} }
95   void f_xi_const_rref_refqual(Constrain auto) const&& {}; // { dg-error {cannot be overloaded with} }