[gcn] install.texi: Update for new ISA targets and their requirements
[gcc.git] / gcc / testsuite / g++.dg / cpp23 / explicit-obj-ops-mem-subscript.C
blob3eb003062c092d8b7f7d7500411d26634b6f5380
1 // P0847R7
2 // { dg-do compile { target c++23 } }
4 // uses of member only operators (subscript)
6 // execution paths for subscript with 1 argument and 0 and 2+ arguments are different
7 // therefore we should additionally test the 0 and 2 argument cases as well
9 struct S {
10   void operator[](this S&) {}
11   void operator[](this S&, int) {}
12   void operator[](this S&, int, int) {}
13   template<typename... Args>
14   void operator[](this S&, Args... args) {}
17 void non_dep()
19   S s{};
20   s[];
21   s[0];
22   s[0, 0];
23   s[0, 0, 0];
26 template<typename = void>
27 void dependent()
29   S s{};
30   s[];
31   s[0];
32   s[0, 0];
33   s[0, 0, 0];
36 void call()
38   dependent();