Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.other/new5.C

raw
1 // { dg-do run }
2 // Test that const-correctness is observed when using new.
3
4 struct A {
5 A() { }
6 int f () { return 1; }
7 int f () const { return 0; }
8 };
9
10 int main ()
11 {
12 return (new const A)->f ();
13 }