Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.bugs/900210_10.C

raw
1 // { dg-do assemble }
2 // g++ 1.36.1 bug 900210_10
3
4 // g++ allows operator[] to be declared as a static member function.
5 // This is illegal.
6
7 // Cfront 2.0 passes this test.
8
9 // keywords: operator[], static function members
10
11 struct struct0 {
12 static int operator[] (); /* { dg-error "" "" { target c++20_down } } */
13 };
14
15 int main () { return 0; }